• Hey guys!

    So I’ve run into a problem with my main wordpress setup. Just to give a background:

    I had hired a developer to clone the WP site on my main domain to a subdomain – and make minor alterations on this sub-site according to it’s purpose. This subsite is identical to main site in almost all aspects, except it has different range of products basically.

    It was working all fine for the last couple of months. Both the sites running smoothly in their own respective domains. However, since yesterday, the main domain setup has been redirecting to this subdomain. I can’t even access the WP Dashboard on the main domain. Trying to access the login URL for the main WP dashboard takes me to the subdomain’s WP dashboard!

    1. Checked the htaccess logs for both the installations. No alterations over there. Both are still looking good.
    2. Checked cloudflare settings. All good over there.
    3. Checked cPanel redirect settings – nothing there.
    4. Checked wp_options table in both the DB (main site and sub site) – both are correctly set.
    5. wp-config is correctly set as well for both.

    I’m losing my head since the last 12 hours trying to find the cause of this! Any help guys? 🙁

    P.S.: Multisite isn’t enabled on either of the WP installations.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Have you checked the functions.php?

    Thread Starter jainy25

    (@jainy25)

    Which functions.php are we talking about? None of the files were modified recently.

    Also, when I tried renaming the directory for the subdomain, the main site ends up showing 404 error, which means it is still trying to find and take me to that subdomain URL.

    I’ve seen redirects set in the theme functions file. Just another location to check. I’m also entrigued that the redirect adds ?v=7516fd43adaa to the URL. Is that normal? If your site just randomly started that redirecting…I would suggest renaming your plugins so they deactivate to see if that is causing the issue.

    Thread Starter jainy25

    (@jainy25)

    The problem is that I cannot even access the dashboard on the main site. So I’m not sure how to really get to deactivate the plugins… 🙁

    I do somehow suspect Wordfence might have caused this. I don’t know why. My genius developer guy basically cloned the main site to the subdomain without enabling multisite, so the APIs for some of the plugin remain the same across both the setups. Maybe that might have caused the merger?

    The ?v=… is basically a geolocation function, since Woocommerce is setup in such a way to detect users by their location and offer the specific currency, shipping options.

    So you have no access to FTP or cPanel?

    Thread Starter jainy25

    (@jainy25)

    I do. I have in fact tried renaming the plugins/theme directory to see if it might trigger a reaction in the right direction. But nope, still points to the subdomain.

    Well, last suggestion from me is to check your DNS settings. If everything checks out then re-upload core wordpress files just in case any have been tampered with.

    Thread Starter jainy25

    (@jainy25)

    I am thinking of probably trying to restore one of the older backups. Or probably create a secondary SQL database from the backup and try linking the main site to that to see if it could help us in any way.

    The other thing I’m thinking of is, if I were to enable Multisite now on the main domain, perhaps it might start rendering both the sites differently then?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Main WP Site Redirecting to Subdomain WP Installation’ is closed to new replies.