Title: Setup multisite inside a subdirectory as a test site
Last modified: December 5, 2017

---

# Setup multisite inside a subdirectory as a test site

 *  [thesaurav](https://wordpress.org/support/users/thesaurav/)
 * (@thesaurav)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/setup-multisite-inside-a-folder/)
 * I need to upload my multisite from local server to staging server inside a directory
   e.g mydomain.com/multisite and all other sites like mydomain.com/multisite/site1,
   mydomain.com/multisite/site2 and so on.
    I couldnt find a definite solution with
   the changes in wp-config.php and .htaccess file. Anyhow the site main url redirects
   to wp-signup.php page. See My code below for the example changes I have made.
 * wp-config.php
    define(‘DOMAIN_CURRENT_SITE’, ‘www.mydomain.com’); define(‘PATH_CURRENT_SITE’,‘/
   multisite/’);
 * htaccess:
    RewriteBase /multisite/
 * and the respective changes to the databases, but the error remains same.
    -  This topic was modified 8 years, 6 months ago by [thesaurav](https://wordpress.org/support/users/thesaurav/).
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fsetup-multisite-inside-a-folder%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [David Sword](https://wordpress.org/support/users/davidsword/)
 * (@davidsword)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/setup-multisite-inside-a-folder/#post-9765404)
 * Mine worked fine with:
 *     ```
       define('WP_DEBUG', true)
   
       define( 'WP_ALLOW_MULTISITE', true );
       define('MULTISITE', true);
       define('SUBDOMAIN_INSTALL', false);
       define('DOMAIN_CURRENT_SITE', 'localhost');
       define('PATH_CURRENT_SITE', '/multisite/');
       define('SITE_ID_CURRENT_SITE', 1);
       define('BLOG_ID_CURRENT_SITE', 1);
       ```
   
 * and
 *     ```
       RewriteEngine On
       RewriteBase /multisite/
       RewriteRule ^index\.php$ - [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).*) $2 [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
       RewriteRule . index.php [L]
       ```
   
 * The only thing I could see from the docs is that you need to setup before – but
   that shouldn’t matter when you’re migrating.
 * >  If you plan to run WordPress out of its own directory, do that before activating
   > Multisite.
 * Do you get any apache/php errors?
    -  This reply was modified 8 years, 6 months ago by [David Sword](https://wordpress.org/support/users/davidsword/).

Viewing 1 replies (of 1 total)

The topic ‘Setup multisite inside a subdirectory as a test site’ is closed to new
replies.

## Tags

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

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 1 reply
 * 2 participants
 * Last reply from: [David Sword](https://wordpress.org/support/users/davidsword/)
 * Last activity: [8 years, 6 months ago](https://wordpress.org/support/topic/setup-multisite-inside-a-folder/#post-9765404)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
