Question

Wordpress site wont show theme after migration from main domain to subdomain, also can't access wp-admin

Posted December 23, 2019 323 views
WordPress

Could anyone think of why this may be the case?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
2 answers

Hello,

Yes, this usually happens when the Worpdress Site and Home URLs are not correct.

As you can’t access your Wordpress admin area, what you could do is add the following to your wp-config.php file:

define('WP_HOME','http://example.com');
define('WP_SITEURL','http://example.com');

Then clear the cache of your browser and try accessing your site again.

Let me know how it goes!
Regards,
Bobby

  • I tried that and now I get an HTTP500 Access error whenever I try to load the page.

    • Hello,

      In this case I would recommend checking your error log for more information, you could run the following to get the last 100 lines of your Apache error log:

      tail -100 /var/log/apache2/error.log
      

      There you should see the actual error rather than the generic 500 error.

      If you are unsure, feel free to share the error here.

      Regards,
      Bobby

      • Ok so somehow changing those lines worked again, but now no matter what theme I choose the site just looks like a skeleton theme. i have no idea how I keep breaking things. my site is blog.aedonisbravo.com by the way.

        • Hello,

          You need to make sure that all of the references for your main domain name are updated to your blog subdomain name in your database.

          You can use a tool like this one here to find all of the references for http://yourdomaim.com and change them with http://blog.yourdomain.com:

          https://interconnectit.com/products/search-and-replace-for-wordpress-databases/

          This is a standard procedure when migrating a Wordpress website from one domain to another.

          Note that the search and replace tool can damage your database a lot in case that you do not add the correct values, so I would strongly recommend making a backup of your database before using the tool!

          Regards,
          Bobby

Ok so somehow changing those lines worked again, but now no matter what theme I choose the site just looks like a skeleton theme. i have no idea how I keep breaking things. my site is blog.aedonisbravo.com by the way.

Submit an Answer