WordPress.org

Ready to get started?Download WordPress

Forums

WP3 Multisite - changing server (3 posts)

  1. maddin2009
    Member
    Posted 4 years ago #

    Hi out there.

    i created a wp3 multisite with sites like

    domain.com/subfolder/site1
    domain.com/subfolder/site2
    domain.com/subfolder/site3

    now my aim is, to migrate this installation of wordpress to another domain with subdomain like

    sub.otherdomain.com/subfolder/site1
    sub.otherdomain.com/subfolder/site2
    sub.otherdomain.com/subfolder/site3

    i changed my .htaccess, my wp-config and in my database in all option tables the three values of "siteurl", "home" and "fileupload_url"

    but nothing is working. any hints what i have to change also?

    here are my wp-configs:

    before:

    define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/subfolder/';
    define( 'DOMAIN_CURRENT_SITE', 'domain.com' );
    define( 'PATH_CURRENT_SITE', '/subfolder/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    after:

    define('WP_ALLOW_MULTISITE', true);
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', true );
    $base = '/subfolder/';
    define( 'DOMAIN_CURRENT_SITE', 'sub.otherdomain.com' );
    define( 'PATH_CURRENT_SITE', '/subfolder/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    another thing is, if i delete all of this stuff in my config file exept "wp_allow_multisite" its working. going to my backend and checking what wordpress is saying what i have to include into my config file there is "subdomain install" disabled and "domain_current_site" is my old domain. so anywhere in my DB i guess there has to be more information about my old domain, not only in "siteurl", "home" and "fileupload_url"

    any hints please?

  2. If you're changing the domain itself, you need to change it in all instances in the database. there are a LOT.

  3. maddin2009
    Member
    Posted 4 years ago #

    okay, i've changed a lot more now and it seems to work. thanks!

    here are my queries i've done:

    UPDATE wp_options SET option_value =
    replace(option_value, 'http://domain.com/subfolder', 'http://sub.otherdomain.com/subfolder');
    UPDATE wp_posts SET post_content =
    replace(post_content, 'http://domain.com/subfolder', 'http://sub.otherdomain.com/subfolder');
    UPDATE wp_posts SET guid =
    replace(guid, 'http://domain.com/subfolder', 'http://sub.otherdomain.com/subfolder');

    this queries i also ran again with "www." in my old domain

    then i queried:

    UPDATE wp_blogs SET domain =
    replace(domain, 'domain.com', 'sub.otherdomain.com');

    in wp_blogs i also changed the path row (important!)

    after all this stuff i searched manually with phpmyadmin for my old domain name and changed the resulted rows again, but i dont think thats such important, because it was only something like "comment user url" or something like that.

    thats it ;) hope this will help somebody

Topic Closed

This topic has been closed to new replies.

About this Topic