WordPress.org

Ready to get started?Download WordPress

Forums

WordPress MU Domain Mapping
[resolved] Moving a whole network to a new main domain (6 posts)

  1. multimule
    Member
    Posted 3 years ago #

    I have a network installation at the main domain of foo.com which should be moved to bar.com.

    So far I figured out these steps:

    1. change "DOMAIN_CURRENT_SITE" to reflect the new domain:
    define( 'DOMAIN_CURRENT_SITE', 'bar.com' );

    2. replace "foo.com" by "bar.com" in the "wp_blogs" DB table

    3. replace "foo.com" by "bar.com" in the "wp_options" DB table

    With this in place the main site and it's dashboard is accessible.

    However, the blogs/sites in the network still have the old domain (eg. x.foo.com). So I replaced all occurances of "x.foo.com" by "x.bar.com", but that resulted in site-not-found errors when trying to open it in the browser.

    What am I missing?

  2. Yeah, it's a pill. Did you search the whole database, the wp-config.php, and the .htaccess?

  3. multimule
    Member
    Posted 3 years ago #

    I was missing the subdomain wildcard in bar.com (*.bar.com).

    To sum things up here are the essential steps for such a move:

    1. change "DOMAIN_CURRENT_SITE" to reflect the new domain:
    define( 'DOMAIN_CURRENT_SITE', 'bar.com' );

    2. replace "foo.com" by "bar.com" in the "wp_blogs" DB table

    3. replace "foo.com" by "bar.com" in the "wp_options" DB table

    4. Make sure the wildcard domain is set correctly. When you configured foo.com, you've set *.foo.com. Do the same for *.bar.com.

    5. To be able to view a specific sub-site in the new network domain (e.g. x.bar.com), update any references to the old domain (foo.com) in "wp_blogs" DB table AND reconfigure the blog via the network admin backend to reflect the new sub-domain.

    This should make it possible to at least view the sub-blogs.

    However, if you want a full migration (including any plugin settings), you'll need to update any remaining reference from x.foo.com to x.bar.com in the database (for each subdomain ofc).

  4. jedwards-kcbt
    Member
    Posted 3 years ago #

    @mulimule in Step 4 is that updating the wildcard DNS?

    thanks for the direction.... I have to accomplish this in 30 days!

  5. Yes, it is. make sure the new domain on the host side will be able to have wildcard subdomains.

    30 days? should be able to do it in an afternoon.

  6. multimule
    Member
    Posted 3 years ago #

    @jedwards-kcbt

    In order to continue production use on the new domain you should scan your whole database for references to the old domain and replace them if necessary.

    In my case I use this only to test WP updates before I do them in production.

    Cheers

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic