1

This is my first time playing with WPMU, I'm trying to move an entire WPMU site into a subdomain of itself for a development environment. The site itself is using subdomains so I'm having a bit of trouble getting it working. Has anyone had this task/problem before?

I need to move http://example.com to http://dev.example.com.

I have moved all the files into a subfolder and configured it via the server, moved the database into a separate one, updated the home & siteurl in the wp_options table and my wp_config.php is as follows:

define( 'WP_ALLOW_MULTISITE', true );
define( 'MULTISITE', true );
define( 'SUBDOMAIN_INSTALL', true );
define( 'NOBLOGREDIRECT', 'http://dev.example.com/' ); // added by me in dev only
$base = '/';
define( 'DOMAIN_CURRENT_SITE', 'dev.example.com' );
define( 'PATH_CURRENT_SITE', '/' );
define( 'SITE_ID_CURRENT_SITE', 1 );
define( 'BLOG_ID_CURRENT_SITE', 1 );

When I try to hit the dev subdomain in the browser it redirects to

/wp-signup.php?new=dev.example.com 

Can anyone help/give pointers/anything?

2 Answers 2

2

Multisite is meant to be either one or the other, and it's not meant to be changed. If I were you, I'd move it to a testing domain rather than a subdomain, since you're going to have to change it back when it's time to move, and I don't know what sort of behaviors you'll see.

Tutorial here.

Basically, back up your DB, change each blog's URL, turn VHOSTS off in wp-config.php, turn the wildcard domain on or off depending, and redirect the old root URL to the new root URL.

1
  • 1
    Thanks SickHippie, I recommended the testing domain, but they wanted to make it "quick and easy". We're moving forward with a new domain now. LOL.
    – Shaun Ault
    Aug 2, 2012 at 21:36
0

The reason you are getting the error is because according to the database the main domain is still example.com. By default, WPMU redirects you to the sign up page, if the sub domain is not recognized.

Did you remember to change the built in site URLs (These can be found under "admin » Settings" page)? I have tried to do what you are doing in the past but never managed to do it (It wasn't needed and really pointless for my set-up anyway). You will also need to remember to register the wildcard domain *.dev.example.com.

1
  • I did not register the wildcard, but I did all of the other steps. We ended up with a second domain for testing.
    – Shaun Ault
    Aug 2, 2012 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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