Title: WordPress Multisite Redirect Loop on Localhost
Last modified: August 22, 2016

---

# WordPress Multisite Redirect Loop on Localhost

 *  [axxint](https://wordpress.org/support/users/axxint/)
 * (@axxint)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-multisite-redirect-loop-on-localhost/)
 * So many people seem to have trouble with this, but I haven’t found anything that
   fixes my issues.
 * WPMU 4.o (recently upgraded) moving to XAMPP 3.2.1 for development.
 * My site is at localhost/mysite, or on my machine at C:\xampp\htdocs\mysite.
 * When I try to visit my site at localhost/mysite I get “This webpage has a redirect
   loop” or “The page isn’t redirecting properly. Firefox has detected that the 
   server is redirecting the request for this address in a way that will never complete”.
    - It’s a subfolder setup, so it should work on a localhost.
    - I changed the wp-config.php file, making sure to set the ABSPATH to my folder
      directory
    - I changed references in the db in wp_options, wp_site, wp_blogs
    - I changed the .htaccess file in the WP folder according to this post [http://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite](http://codex.wordpress.org/Multisite_Network_Administration#.htaccess_and_Mod_Rewrite)
    - I followed these guides: [http://premium.wpmudev.org/blog/how-to-install-wordpress-locally-for-pcwindows-with-xampp/](http://premium.wpmudev.org/blog/how-to-install-wordpress-locally-for-pcwindows-with-xampp/),
      [http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite](http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Multisite)
    - It was coming from WPengine, so I had to delete the mu-plugins.php file and
      the WPengine plugin in the mu-plugins folder.
    - I have cookies enabled in my browsers, and have cleared my browser histories.
 * content of .htaccess
 *     ```
       # BEGIN WordPress
       RewriteEngine On
       RewriteBase /
       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]
       # END WordPress
       ```
   
 * content of wp-config.php
 *     ```
       <?php
       # Database Configuration
       define( 'DB_NAME', 'mysite2014-11-14' );
       define('DB_USER', 'root');
       define('DB_PASSWORD', '');
       define('DB_HOST', 'localhost');
       define('DB_CHARSET', 'utf8');
       define('DB_COLLATE', 'utf8_unicode_ci');
       $table_prefix = 'wp_';
   
       # Security Salts, Keys, Etc
       define('AUTH_KEY',         'xxxxx');
       define('SECURE_AUTH_KEY',  'xxxxx');
       define('LOGGED_IN_KEY',    'xxxxx');
       define('NONCE_KEY',        'xxxxx');
       define('AUTH_SALT',        'xxxxx');
       define('SECURE_AUTH_SALT', 'xxxxx');
       define('LOGGED_IN_SALT',   'xxxxx');
       define('NONCE_SALT',       'xxxxx');
   
       define('WPLANG','');
   
       define( 'WP_ALLOW_MULTISITE', true );
       define( 'MULTISITE', true );
       define( 'SUBDOMAIN_INSTALL', false );
       $base = '/';
       define( 'DOMAIN_CURRENT_SITE', 'localhost/mysite' );
       define( 'PATH_CURRENT_SITE','/' );
       define( 'SITE_ID_CURRENT_SITE', 1 );
       define( 'BLOG_ID_CURRENT_SITE', 1 );
   
       # Thats It. Pencils down
       if ( !defined('ABSPATH') )
         define('ABSPATH', dirname(__FILE__) . '/mysite');
       require_once(ABSPATH . 'wp-settings.php');
       ```
   
 * I have some other WP and Drupal sites working locally. Mod rewrite is enabled.
 * When I comment out the multisite stuff in the wp-config.php file, the site partially
   loads, but with an error message about get_blog_details (which is expected). 
   So it’s something about the multisite.
 * I’ve been troubleshooting this for two weeks, and I can’t figure out what to 
   do. Any help would be appreciated!
 * Thanks!

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

 *  [Abhishek Ghosh](https://wordpress.org/support/users/abhishek_ghosh/)
 * (@abhishek_ghosh)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-multisite-redirect-loop-on-localhost/#post-5490494)
 * We use Vagrant for localhost now. XAMPP/WAMP/MAMP are VAMPS lol, they are not
   exactly like the real world. Get used with vagrant instead of the old methods.
   There are WPengine like vagrant available. Read about Vagrant – [http://wordpress.tv/2013/10/19/jeremy-felt-hi-wordpress-meet-vagrant/](http://wordpress.tv/2013/10/19/jeremy-felt-hi-wordpress-meet-vagrant/)
 *  Anonymous User 9055193
 * (@anonymized-9055193)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-multisite-redirect-loop-on-localhost/#post-5490500)
 * Your htaccess looks fine with exception to your file uploads script. You may 
   wish to comment that out while you debug.
 * > When I comment out the multisite stuff in the wp-config.php file, the site 
   > partially loads, but with an error message about get_blog_details (which is
   > expected). So it’s something about the multisite.
 * Usually when that happens, try commenting out all the Multisite lines in wp-config.
   php except for:
 * `define( 'WP_ALLOW_MULTISITE', true );`
 * Also, comment or disable your htaccess file for now. Then if you’re able to get
   into /wp-admin/ and view Network Setup, try to copy-paste those fresh snippets
   again.
 * Start there.

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

The topic ‘WordPress Multisite Redirect Loop on Localhost’ is closed to new replies.

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 2 replies
 * 3 participants
 * Last reply from: Anonymous User 9055193
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/wordpress-multisite-redirect-loop-on-localhost/#post-5490500)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
