12

I migrated content from our production server to our dev server in an attempt to sync all environments. I used the All-In-One WP Migration plugin.

Now, when I access dev.domain.com I am forwarded to http://dev.domain.com/wp-signup.php?new=dev.domain.com

It sounds like one of the database values must be incorrect and WordPress is forwarding me here because of it. If I disable Multisite, everything seems to function properly.

Here is my .htaccess:

<FilesMatch "(\.(bak|config|sql|fla|psd|ini|log|sh|inc|swp|dist)|~)$">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
<FilesMatch "^(wp-config\.php|readme\.html|license\.txt)">
 Order allow,deny
  Deny from all
  Satisfy All
 </FilesMatch>

and my wp-config:

/** Multisite / Wordpress Network **/
 define('MULTISITE', true);
 define('SUBDOMAIN_INSTALL', true);
 define('DOMAIN_CURRENT_SITE', 'dev.domain.com');
 define('PATH_CURRENT_SITE', '/');
 define('SITE_ID_CURRENT_SITE', 1);
 /** fix for Multisite 'SubDomains' - Not Working for me :( */
 define('ADMIN_COOKIE_PATH', '/');
 define('COOKIE_DOMAIN', '');
 define('COOKIEPATH', '');
 define('SITECOOKIEPATH', '');
6

You'll want to add these to your wp-config.php file:

define( 'NOBLOGREDIRECT', '' );    
define( 'WP_HOME', 'http://dev.domain.com' );
define( 'WP_SITEURL', 'http://dev.domain.com' );

So in its entirety, you'll have:

    $base = '/';
    /** Multisite / Wordpress Network **/
    define( 'WP_HOME', 'http://dev.domain.com' );
    define( 'WP_SITEURL', 'http://dev.domain.com' );
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    define( 'DOMAIN_CURRENT_SITE', 'dev.domain.com' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    /** fix for Multisite 'SubDomains' - Not Working for me :( */
    define( 'ADMIN_COOKIE_PATH', '/' );
    define( 'COOKIE_DOMAIN', '' );
    define( 'COOKIEPATH', '' );
    define( 'SITECOOKIEPATH', '' );
    define( 'NOBLOGREDIRECT', 'http://dev.domain.com' );

And be sure to check your dbprefix_options table in the database for all domain references.

  • Thanks for the quick response. I added the settings you indicated above. Now I see: "Object Moved This document may be found here" .. The link goes to the same page I am on (dev.domain.com/wp-admin) – Alex Schmaltz Oct 15 '14 at 19:03
  • With the NOBLOGREDIRECT definition as 'dev.domain.com', I get a redirect failure from firefox. – Alex Schmaltz Oct 15 '14 at 19:18
  • Did you have an 'http://' before it? – Courtney Ivey Oct 15 '14 at 19:19
  • Removing the DOMAIN_CURRENT_SITE, PATH_CURRENT_SITE, and SITE_ID_CURRENT_SITE definitions yield 'Error establishing a database connection' .. which is interesting. – Alex Schmaltz Oct 15 '14 at 19:19
  • Yes, I did. Sorry. -- define('NOBLOGREDIRECT', 'dev.domain.com'); – Alex Schmaltz Oct 15 '14 at 19:19
6

For me it was changing old domain entries in database tables wp_blogs and wp_site to the new domain of the multisite's main domain.

I haven't done this after the migration to a new domain.

  • 2
    This answer should be higher up and everywhere. Where have you been my past two weeks of problem solving? Nothing else working..? André Kelling has the answer! – Dave Nov 28 '18 at 15:47
  • 1
    Awesome, found this answer after 2 hours of frustration... Made me realize always do an SQL query to replace strings... – Beee Jul 11 at 8:28
  • This is the answer. – Francesco Aug 3 at 9:31
1

For me, in addition to the changes above, it turned out to be a DNS configuration issue with my hosting provider. When WP was initially installed as a single site there was a *.mydomain.com entry in the DNS pointing to mydomain.com. The the site moved to multisite and all worked as expected. Finally when we moved back to single site I started getting the error above. Removing the *.mydomain.com entry from my DNS did the trick for me.

0

I just wanted to share my solution that worked go to your database table wp_options and make sure the WWW is added so the url is https://www.domain.com and not https://domain.com do this for both siteurl and home table.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.