Reputation: 889
I have copied a WordPress application to a new hosting environment. The application has subdomains enabled, however our new hosting environment does not support this. I have updated .htaccess
as well as wp-config.php
to reflect the new URL and new database. I am unable to navigate through the site whatsoever. Going to wp-admin leads me to the classic error message:
Error establishing a database connection
If your site does not display, please contact the owner of this network. If you are the owner of this network please check that MySQL is running properly and all tables are error free.Could not find site example.com. Searched for table wp_blogs in database wp. Is that right?
What do I do now? Read the bug report page. Some of the guidelines there may help you figure out what went wrong. If you’re still stuck with this message, then check that your database contains the following tables:
wp_users
wp_usermeta
wp_blogs
wp_signups
wp_site
wp_sitemeta
wp_registration_log
wp_blog_versions
I imagine this has something to do with the URL mappings in the database. Keep in mind, we are trying to switch from subdomains to subdirectories. What steps must I take to correct this in addition to switching over from subdomains?
Upvotes: 1
Views: 5969
Reputation: 441
There are a few things you need to do to switch from subdomain to subdirectory.
This forum topic should have most of the details needed: https://premium.wpmudev.org/forums/topic/reverting-from-subdomains-to-subdirectories-in-multistie
That said when migrating to a new host with multisite and getting the DB connectivity errors, what usually is the cause is the mismatch in the wp_blogs & wp_sites tables.
If you can manually edit those tables and correct at least your primary domain you should be able to get back in and correct the rest via the network admin.
Upvotes: 2