Title: Multisite from subfolder to root
Last modified: August 30, 2016

---

# Multisite from subfolder to root

 *  [sandras21](https://wordpress.org/support/users/sandras21/)
 * (@sandras21)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/multisite-from-subfolder-to-root/)
 * Hello,
 * I have problems to get my multisite network up and running from main url mysite.
   com. I configured network first to subfolder mysite.com/test and want to display
   it now under main domain. I found some instructions but still don`t get the site
   up.
    1. in [codex](http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install)
   is instruction to change site url from admin – general settings, this option 
   does not exist in my WP version, so I tried to do it in wp_config file and also
   in functions file (not in same time obviously) as explained [here](https://codex.wordpress.org/Changing_The_Site_URL)
   by adding to function file following code: update_option(‘siteurl’,’[http://example.com&#8217](http://example.com&#8217););
   update_option(‘home’,’[http://example.com&#8217](http://example.com&#8217););
   Then I copied index and htcaccess files under root directory and edited index
   file: require( dirname( __FILE__ ) . ‘/wp-blog-header.php’ ); to the following,
   using your directory name for the WordPress core files: require( dirname( __FILE__).‘/
   Test/wp-blog-header.php’ ); but when going to domain I keep getting an error “
   Error establishing a database connection”. What I miss ? Thank you in advance
   for advice!

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

 *  [Vaughan](https://wordpress.org/support/users/m0nty/)
 * (@m0nty)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/multisite-from-subfolder-to-root/#post-6265803)
 * Hi sandras,
 * Multisite does work differently to single site installs.
 * Personally I think the easiest method of doing this, would have been to change
   the documentRoot of your domain in your CPanel DNS zone settings, so that instead
   of the domain pointing at /public_html
 * You instead point it at /public_html/test
 * then using a plugin such as [https://wordpress.org/plugins/better-search-replace/](https://wordpress.org/plugins/better-search-replace/)
 * you can then use that to search the DB for your old URL paths
 * domain.com/test replace with domain.com
 * then just update your permalinks.
 * With the method you have tried above though, i notice you used all lowercase 
   in the description
 * > I have problems to get my multisite network up and running from main url mysite.
   > com. I configured network first to subfolder mysite.com/test
 * > require( dirname( __FILE__ ) . ‘/Test/wp-blog-header.php’ );
 * Is the folder name correct here? /Test or should it be /test?
 * Character case on folder names really does matter.
 * Hope this helps
 *  Thread Starter [sandras21](https://wordpress.org/support/users/sandras21/)
 * (@sandras21)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/multisite-from-subfolder-to-root/#post-6265816)
 * Thanks Vaughan for your reply! My hosting company tried to redirect root to subfolder
   where I have new site but after that the main domain gives an error “Error establishing
   a database connection” and subfolder (mydomain.com/test) gives error too: “Internal
   Server Error. The server encountered an internal error or misconfiguration and
   was unable to complete your request. Please contact the server administrator,
   [apache-admins@zone.ee](https://wordpress.org/support/topic/multisite-from-subfolder-to-root/apache-admins@zone.ee?output_format=md)
   and inform them of the time the error occurred, and anything you might have done
   that may have caused the error. More information about this error may be available
   in the server error log. Additionally, a 500 Internal Server Error error was 
   encountered while trying to use an ErrorDocument to handle the request.”
 * They said that I shall have something wrong but now I have no idea where to start–
   all database names and passwords are correct, character case should b also ok,
   i also changed back everything what I change while I tried to do this redirection
   first time. If hosting company is removing redirection everything is back as 
   before (old site from old domain and new site from main domain/test . Does somebody
   have suggestions?

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

The topic ‘Multisite from subfolder to root’ is closed to new replies.

## Tags

 * [multi-site](https://wordpress.org/support/topic-tag/multi-site/)
 * [multisite](https://wordpress.org/support/topic-tag/multisite/)

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 2 replies
 * 2 participants
 * Last reply from: [sandras21](https://wordpress.org/support/users/sandras21/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/multisite-from-subfolder-to-root/#post-6265816)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
