Title: Moving WP Multisite to localhost, redirect loop
Last modified: August 30, 2016

---

# Moving WP Multisite to localhost, redirect loop

 *  [axxint](https://wordpress.org/support/users/axxint/)
 * (@axxint)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/moving-wp-multisite-to-localhost-redirect-loop/)
 * I need to set up a development site for a live Multisite, and I’m trying to move
   everything to a localhost powered by XAMPP. This is my first time moving an exisitng
   multisite to local, so I’m probably doing something wrong.
 * My XAMPP install works fine on other WP and Drupal sites, and works for this 
   site when not in multisite mode.
 * I’ve moved over the database and files to local. I ran interconnectit on the 
   database, and changed my wp-config.php to point to the new database.
 * When I comment out all the multisite configurations in wp-config.php I can view
   and log onto the site just fine (but it’s not a wp multisite of course).
 * When I add in the multisite configurations I get either a redirect loop or a 
   database connection error depending on how I set them up.
 * The following is how I had it setup on the live server, with ‘localhost’ replacing
   the URL. This gives me a database connection error.
 *     ```
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', false );
       define( 'PATH_CURRENT_SITE','/' );
       define( 'DOMAIN_CURRENT_SITE', 'localhost');
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
       ```
   
 * The following is what Tools -> Network Setup tells me to paste in my wp-config
   file. It tries to go to “[http://localhost/nn/nn/&#8221](http://localhost/nn/nn/&#8221);.
   It gives me a redirect loop.
 *     ```
       define('MULTISITE', true);
       define('SUBDOMAIN_INSTALL', false);
       define('DOMAIN_CURRENT_SITE', 'localhost/nn');
       define('PATH_CURRENT_SITE', '/nn/');
       define('SITE_ID_CURRENT_SITE', 1);
       define('BLOG_ID_CURRENT_SITE', 1);
       ```
   
 * The following seemed a logical change. It tries to go to [http://localhost/nn/](http://localhost/nn/),
   which is correct. However, it still has a redirect loop.
 *     ```
       define('MULTISITE', true);
       define('SUBDOMAIN_INSTALL', false);
       define('DOMAIN_CURRENT_SITE', 'localhost/nn');
       define('PATH_CURRENT_SITE', '/');
       define('SITE_ID_CURRENT_SITE', 1);
       define('BLOG_ID_CURRENT_SITE', 1);
       ```
   
 * I also have in my wp-config.php the following:
 *     ```
       /** Absolute path to the WordPress directory. */
       if ( !defined('ABSPATH') )
         /*define('ABSPATH', dirname(__FILE__) . '/');*/
         define('ABSPATH', dirname(__FILE__) . '/nn/');
   
       /** Sets up WordPress vars and included files. */
       require_once(ABSPATH . 'wp-settings.php');
       ```
   
 * It doesn’t seem to matter what I set the ABSPATH to, I still get a redirect loop.
 * Here is my htaccess file:
 *     ```
       RewriteEngine On
       RewriteBase /nn/
       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]
       ```
   
 * I disabled all plugins by renaming the plugins folder. I get the same issues.
 * The theme for blog 1 is an unmodified studiopress theme, so it’s pretty safe.
 * I get this issue even when I clear cookies, so I don’t think it’s this issue:
   [https://tommcfarlin.com/resolving-the-wordpress-multisite-redirect-loop/](https://tommcfarlin.com/resolving-the-wordpress-multisite-redirect-loop/).
 * The paths and domains look correct to me in the wp_blogs table, and in the individual
   wp_#_options tables. (They should be, I ran interconnectit on the whole database.)
 * I’ve been looking for a fix, but haven’t found anything where the site worked
   as a single install but didn’t as a multisite.
 * Any advice would be appreciated!

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

 *  Moderator [Bet Hannon](https://wordpress.org/support/users/bethannon1/)
 * (@bethannon1)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/moving-wp-multisite-to-localhost-redirect-loop/#post-6458712)
 * Hmm… I’m not sure why this is failing.
 * I use ServerPress to set up localhost environments, and I know it works with 
   multisite.
    [http://docs.serverpress.com/article/82-getting-started-with-wordpress-multisite](http://docs.serverpress.com/article/82-getting-started-with-wordpress-multisite)
 *  [adammontague](https://wordpress.org/support/users/adammontague/)
 * (@adammontague)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/moving-wp-multisite-to-localhost-redirect-loop/#post-6458759)
 * I was also getting a redirect loop and it was driving me crazy. This was the 
   only tutorial that made sense and worked first time for moving a multisite to
   localhost:
 * [http://www.aurodigo.com/2013/12/moving-wordpress-multisite-from-live-server-to-localhost-safely.html](http://www.aurodigo.com/2013/12/moving-wordpress-multisite-from-live-server-to-localhost-safely.html)

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

The topic ‘Moving WP Multisite to localhost, redirect loop’ is closed to new replies.

## Tags

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

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 2 replies
 * 3 participants
 * Last reply from: [adammontague](https://wordpress.org/support/users/adammontague/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/moving-wp-multisite-to-localhost-redirect-loop/#post-6458759)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
