Title: Multisite setup issues
Last modified: August 20, 2016

---

# Multisite setup issues

 *  [markpea](https://wordpress.org/support/users/markpea/)
 * (@markpea)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multisite-setup-issues/)
 * Even after 3 or more successful install of wordpress in multisite mode I still
   cannot get my head around the process or why it’s so finicky. Basically, I have
   ssh and sudo access to my server so I do everything on the command line (no faffing
   with cpanel and the like).
    I create the mysql database in the normal way with`
   mysql> CREATE DATABASE testbp DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;`
   and add the database user. I then install the latest 3.2.1 code into the appropriate
   dir `usr/local/www/apache22/data/test-bp` and reconfigure the Apache VHOST to
   point to here. Now I start up the WP site and create an administrator account
   with password. Now I log out.
 * Next I want to convert this to a multisite (folders) setup, so to `wp-config.
   php` I add:
 *     ```
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', false );
       $base = '/';
       define( 'DOMAIN_CURRENT_SITE', 'quake.sergius.earlham.edu' );
       define( 'PATH_CURRENT_SITE', '/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       ```
   
 * And also I configure the appropriate .htaccess.
    As far as I can see I have done
   things in a perfectly logical way and yet when I open up the URL I get:
 * > `Error establishing database connection`
 * Editing the wp-config.php and changing `define( 'MULTISITE', true );` to `false`
   allows me to login.
 * So I’m in a catch-22 situation here. I need a multisite setup and yet the system
   won’t allow me to create one. What is going on here and why is this procedure
   so tricky?

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [markpea](https://wordpress.org/support/users/markpea/)
 * (@markpea)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multisite-setup-issues/#post-2305033)
 * So I drop the database tables and switch `define('WP_DEBUG', true);` to `define('
   WP_DEBUG', false);`. Now the URL loads and I setup the site again with admin 
   user and password.
 * But I still need to convert to multisite so I fire up `vim wp_config.php` and
   in the section:
 *     ```
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', false );
       $base = '/';
       define( 'DOMAIN_CURRENT_SITE', 'blogs.sergius.earlham.edu' );
       define( 'PATH_CURRENT_SITE', '/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       ```
   
 * I change `'MULTISITE', false` to `'MULTISITE', true`. Save and exit.
    A single
   click to reload gives me
 *     ```
       Error establishing database connection
       Could not find site blogs.sergius.earlham.edu. Searched for table wp_blogs in database testbp. 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
       ```
   
 * And, yes, none of the tables wp_blogs
    wp_signups wp_site wp_sitemeta wp_registration_log
   wp_blog_versions exist because the system has not created them yet. This is definitely
   catch-22.
 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multisite-setup-issues/#post-2305063)
 * > Next I want to convert this to a multisite (folders) setup, so to wp-config.
   > php I add:
 * No you added teh wrong thing.
 * Read [http://codex.wordpress.org/Create_A_Network](http://codex.wordpress.org/Create_A_Network)
 * You ONLY add `define('WP_ALLOW_MULTISITE', true);`
 * Then you add the rest as it tells you to add it, after a refresh. Yes it matters
   or we wouldn’t have split it up 🙂
 *  Thread Starter [markpea](https://wordpress.org/support/users/markpea/)
 * (@markpea)
 * [14 years, 8 months ago](https://wordpress.org/support/topic/multisite-setup-issues/#post-2305067)
 * What really puzzles me is the point at which the multisite database tables get
   created. When I first login as an admin I have to do this in single site mode,
   right? Then, at what point do the multisite tables get created? It’s all really
   arcane. Why doesn’t the install script pick up MULTISITE = true and no database
   tables yet and then go ahead and create them? The current process — which I cannot
   figure out — just doesn’t make sense to me. Perhaps someone can explain it. The
   5 steps outlined in [http://codex.wordpress.org/Create_A_Network](http://codex.wordpress.org/Create_A_Network)
   make no mention of the current state of being logged in. Since I can never get
   my system to step 4 I’m in a Catch-22.
    To recap:
    1. Create single user site. In this process you have set up the admin account.
    2. Login as admin
    3. add `define( 'MULTISITE', true);` to wp-config.php while still logged in as 
       admin
    4. Go to profile or try to refresh page. Get error `No site defined on this host.
       If you are the owner of this site, please check Debugging a WordPress Network
       for help.`
    5. Go back to mysql and drop tables. Start again at 1.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Multisite setup issues’ is closed to new replies.

## Tags

 * [Database Error](https://wordpress.org/support/topic-tag/database-error/)
 * [install problem](https://wordpress.org/support/topic-tag/install-problem/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 3 replies
 * 2 participants
 * Last reply from: [markpea](https://wordpress.org/support/users/markpea/)
 * Last activity: [14 years, 8 months ago](https://wordpress.org/support/topic/multisite-setup-issues/#post-2305067)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
