Support » Networking WordPress » Enabling Multisite Broke My Database Connection

  • Resolved drokkon


    This is my second multisite installation, yet it didn’t go as easily as the first, even though they’re on the same VPS.

    I went through the steps to “Set Up a Network” and upon visiting my site again, it simply says Error establishing database connection.

    To be clear, the lines I added to my wp-config.php file are:

    define('WP_ALLOW_MULTISITE', true);
    define('MULTISITE', true);
    define('SUBDOMAIN_INSTALL', false);
    $base = '/';
    define('DOMAIN_CURRENT_SITE', '');
    define('PATH_CURRENT_SITE', '/');
    define('SITE_ID_CURRENT_SITE', 1);
    define('BLOG_ID_CURRENT_SITE', 1);

    This is my entire .htaccess file:

    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    # uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]

    In two locations in the wp_options table the domain is correctly set as and in one location in the wp_site table the domain is correctly set as

    The database information in wp-config has not changed, and I know that the database is still at localhost with the same credentials.

    I’m guessing my mistake is somewhere in the DNS settings, but I’m not sure.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Enabling Multisite Broke My Database Connection’ is closed to new replies.