Title: local multisite setup problem
Last modified: January 30, 2020

---

# local multisite setup problem

 *  Resolved [bclab](https://wordpress.org/support/users/bclab/)
 * (@bclab)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/)
 * Hi
    I am trying to setup a multisite on localhost. local server running with 
   MAMP, installed from scratch with the last WP version (5.3.2). After completion
   of the basic install, I have setup multisite with a subdirectory “en”. I have
   followed the creation process as described in WP documentation, and added the
   recommanded directives to the _.htaccess_ file The dashboard shows the network
   setup : Main site URL is : _localhost/wordpress_ Second site URL is : _localhost/
   wordpress/en_
 * No pages or posts have been added, no settings modified.
 * The main site works well, and the dashboard shows the menu for the network and
   the two sites, but when I try to access to the dashboard for the second site,
   the browser cannot reach it and ends with a “too many redirections error”.
 * I suspect an error in the .htaccess file, but after multiple checks, I still 
   can’t find what is going wrong.
    here it is :
 *     ```
       <IfModule mod_rewrite.c>
       RewriteEngine On
       RewriteBase /wordpress/
       RewriteRule ^index\.php$ - [L]
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteRule . /wordpress/index.php [L]
   
       RewriteEngine On
       RewriteBase /wordpress/
       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).*) $2 [L]
       RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
       RewriteRule . index.php [L]
   
       </IfModule>
       ```
   
 * Thanks for your help!
    -  This topic was modified 6 years, 3 months ago by [bclab](https://wordpress.org/support/users/bclab/).

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

 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/#post-12382494)
 * Your network must be in the /wordpress/ folder the secondary site must be created
   by the network [http://yourdomaim.com/wordpress/en](http://yourdomaim.com/wordpress/en)
   this en is a symbolic path the folder does not exist physically en but index.
   php recognizes this path for the secondary site.
    Create Network [https://wordpress.org/support/article/create-a-network/](https://wordpress.org/support/article/create-a-network/)`
   From network->sites->add new site`. WordPress 3.5 and up on subdirectory wordpress
 *     ```
       RewriteEngine On
       RewriteBase /wordpress/
       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]
       ```
   
 * WordPress 3.0 through 3.4.2 on subdirectory wordpress
 *     ```
       # BEGIN WordPress
       RewriteEngine On
       RewriteBase /wordpress/
       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]
       # END WordPress
       ```
   
 *  [mzaheerdad](https://wordpress.org/support/users/zaheerdad/)
 * (@zaheerdad)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/#post-12382524)
 * Hi,
 * Use the following .htaccess,
 *     ```
       # 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
       ```
   
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/#post-12382631)
 * [http://localhost/wordpress/wp-admin/network/sites.php](http://localhost/wordpress/wp-admin/network/sites.php)(
   sites from network, have add new site)
    Setup multisite for wp-config.php and.
   htaccess [http://localhost/wordpress/wp-admin/network/setup.php](http://localhost/wordpress/wp-admin/network/setup.php)
   your htaccess indicates you started before WordPress 3.5 use this or otherwise
   delete any ftp file and in the database if you really want to use a clean install.
 *  Thread Starter [bclab](https://wordpress.org/support/users/bclab/)
 * (@bclab)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/#post-12384707)
 * Thank you for your replies and suggestions.
 * [@zaheerdad](https://wordpress.org/support/users/zaheerdad/) : I’ve tried your.
   htaccess, but while apparently resolving the redirection problem, it did not 
   work: the URL [http://localhost/wordpress/en/wp-admin/](http://localhost/wordpress/en/wp-admin/)
   finally ended to [http://localhost/MAMP](http://localhost/MAMP)..
 * [@autotutorial](https://wordpress.org/support/users/autotutorial/) : The .htaccess
   you suggested (the 1st one: WP 3.5 and up) seems to work well.
    I have been a
   little bit confused by your references to older WP 3.x versions, but it works
   well! Now, the 2 dashboards are working: – [http://localhost/wordpress/wp-admin/](http://localhost/wordpress/wp-admin/)–
   [http://localhost/wordpress/en/wp-admin/](http://localhost/wordpress/en/wp-admin/)
   and the 2 websites work well with default theme ‘twenty-twenty’
 * but I confess I don’t understand why it works… By the way, if anybody knows an
   on-line resource to ‘htaccess understanding’, I would be happy.
 * Thanks again for your help!
 *  [autotutorial](https://wordpress.org/support/users/autotutorial/)
 * (@autotutorial)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/#post-12386361)
 * It is the standard WordPress code, see Doc htaccess for version 3.0 to 3.4.2 (
   even if you are now using WordPress 5.3)
 * > [htaccess](https://wordpress.org/support/article/htaccess/)
 * 
    if you started your first installation before version 3.5 you have to use the
   htaccess code for 3.0 to 3.4.2 and the code wp_config.php these codes can be 
   found here [http://localhost/wordpress/wp-admin/network/setup.php](http://localhost/wordpress/wp-admin/network/setup.php)
   if from the database in wp_options it has home [http://localhost/wordpress](http://localhost/wordpress)
   it is configured well. you can add secondary sites if the folders do not physically
   exist. in the database You must have a different prefix for each installation
 *  Thread Starter [bclab](https://wordpress.org/support/users/bclab/)
 * (@bclab)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/#post-12386869)
 * Thank you for this additional help.
    I bookmark it for further reference.

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

The topic ‘local multisite setup problem’ is closed to new replies.

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 6 replies
 * 3 participants
 * Last reply from: [bclab](https://wordpress.org/support/users/bclab/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/local-multisite-setup-problem/#post-12386869)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
