0

I was using this tutorial to update my WP install to a WP network: http://www.wpbeginner.com/wp-tutorials/how-to-install-and-setup-wordpress-multisite-network/

I updated my .htaccess and wp-config to the settings provided to me in the prompts and reloaded the WP admin to login again. From there, I got the error: Error establishing a database connection. I did not change any details for my database and I am wondering why this happened. It was working perfectly before I updated my wp-config.php and .htaccess.

My wp-config.php additions were:

define(‘WP_ALLOW_REPAIR’, true);
define(‘WP_ALLOW_MULTISITE’, true);
define(‘SUBDOMAIN_INSTALL’, true);
define(‘DOMAIN_CURRENT_SITE’, ‘casestudies.splashworldwide.com’);
define(‘PATH_CURRENT_SITE’, ‘/’);
define(‘SITE_ID_CURRENT_SITE’, 1);
define(‘BLOG_ID_CURRENT_SITE’, 1);

The update to my .htaccess was:

# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]

# add a trailing slash to /wp-admin
RewriteRule ^wp-admin$ wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ – [L]
RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
RewriteRule ^(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress

These were changes that were requested by the WP admin. I then tried to repair my databases via the admin, and got the following errors:

wp_1_posts: Table ‘casestudies.wp_1_posts’ doesn’t exist
wp_1_comments: Table ‘casestudies.wp_1_comments’ doesn’t exist
wp_1_links: Table ‘casestudies.wp_1_links’ doesn’t exist
wp_1_options: Table ‘casestudies.wp_1_options’ doesn’t exist
wp_1_postmeta: Table ‘casestudies.wp_1_postmeta’ doesn’t exist
wp_1_terms: Table ‘casestudies.wp_1_terms’ doesn’t exist
wp_1_term_taxonomy: Table ‘casestudies.wp_1_term_taxonomy’ doesn’t exist
wp_1_term_relationships: Table ‘casestudies.wp_1_term_relationships’ doesn’t exist
wp_1_termmeta: Table ‘casestudies.wp_1_termmeta’ doesn’t exist
wp_1_commentmeta: Table ‘casestudies.wp_1_commentmeta’ doesn’t exist

What is wrong with my setup, and how can I get my database fixed and working with WP network? Thank you for your help.

0

You are missing define('MULTISITE', true);

I just tested this. I got Error establishing a database connection. without it.

  • YESSSSSS that worked! – Liz Mar 11 '17 at 0:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.