Site Redirecting to wp-signup.php
Question
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', '');
No correct solution
OTHER TIPS
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.
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.
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.
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.
I'm adding to Baxter Jones's solution with a little more context with the original question. I manually changed the records in the options table for the fields 'siteurl' and 'home' from 127.0.0.1/wordpress to be http://dev.domain.com/. This worked for me after I made the other suggested changes for the wp-config file.
Had the same issue. After migration I have changed from "new.domain.com" to "www.domain.com" (at database through phpmyadmin), but seems like the new sitedomain need to be without www, just "domain.com"