title: Wordpress―move from domain.com to localhost/dir
body: <p>I have a wordpress multisite installation which would like to move from the productive domain to my localhost, so the the installation should be altered in a way that <code>somedomain.com</code> becomes <code>localhost/dirname</code>.</p>
  
  <p>Right now I have these settings in <code>wp-config.php</code>:</p>
  
  <pre><code>define( 'WP_ALLOW_MULTISITE', true );
  define( 'MULTISITE', true );
  define( 'SUBDOMAIN_INSTALL', false );
  define( 'DOMAIN_CURRENT_SITE', 'localhost' );
  define( 'PATH_CURRENT_SITE', '/dirname/' );
  define( 'SITE_ID_CURRENT_SITE', 1 );
  define( 'BLOG_ID_CURRENT_SITE', 1 );
  define( 'SUNRISE', 'on' );
  </code></pre>
  
  <p>and the <code>.htaccess</code> looks like:</p>
  
  <pre><code>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]
  </code></pre>
  
  <p>Right now an infinite redirect loop starts to: <code>http://localhost/dirname/wp-signup.php?new=localhost</code></p>
  
  <p>Which settings do I have to make?</p>
  
  <p>Greetings,
  philipp</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>If <code>WP_ALLOW_MULTISITE</code> and <code>MULTISITE</code> is set to <code>false</code> this problem does not occur, but since I need to access the page as multisite this is no option.</p>