The MU forums have moved to WordPress.org

Moving a blog/site from one WPMU installation to another (5 posts)

  1. jamescollins
    Member
    Posted 15 years ago #

    Hi everyone,

    We have two separate WordPress Mu installations, (domain1.com and domain2.com). Each of these installations has 50+ blog/sites set up, with everything running fine. Both WPMu installations are located on the same Centos server.

    The domain1.com WPMU installation is for sites specific to the tourism industry, and the domain2.com WPMU installation is for all other sites (not tourism specific).

    I'm looking for a simple way to move an existing domain1 blog/site (company.domain1.com) to (company.domain2.com) if someone signs up for a domain1.com blog/site when they should have signed up for a domain2.com site

    I have done this manually a few months ago by doing the following steps manually, however I'm wondering if there's a better way to do this. Ideally using a shell script or Mu-plugin to export/import all related posts/pages/options/users/etc.

    ---
    (Assuming company.domain1.com is blog id 20)

    Create a new blog/site on domain2.com WPMU install using my email address (company.domain2.com). This blog/site is created and assigned blog id 47.

    Recreate any user accounts on the company.domain2.com site that belong to the company.domain1.com site.

    Copy the MD5 password hashes for these users from the company1 wp_users table (to keep the passwords the same).

    Export the wp_20_* mysql tables from domain1's mysql database to a text file (sql dump).

    Search and replace in these files, changing user ids to match the new ids, blog id to match new blog id, attachment file locations to match new file locations. Being careful with serialised file paths!

    Backup the wp_47 mysql database tables from domain2's mysql database.

    Import these tables into the domain2 database, overwriting the wp_47 database tables.

    Copy file uploads:
    cp -ar /home/domain1.com/html/wp-content/blogs.dir/20/files/*
    /home/domain2.com/html/wp-content/blogs.dir/47/files/

    Edit apache vhost configuration to do a 301 permanent redirect from http://company.domain1.com -> http://company.domain2.com

    Restart apache.

    Load company.domain2.com site. Ensure it loads correctly, and that posts and pages arelisted as authored by the new users.

    Change users' email address to the real ones.

    All Done.
    ----

    Has anyone tried to do this before? Are there any easier ways to do it?

    Thanks in advance.

    James

  2. lunabyte
    Member
    Posted 15 years ago #

    Have you tried using the export/import functions?

  3. dgilmour
    Member
    Posted 15 years ago #

    WordPress Cloner http://wp-cloner.com/, a commercial product, claims to make this easy...

  4. jamescollins
    Member
    Posted 15 years ago #

    Hi,

    Thanks for the replies.

    The built in WordPress functions will only export/import posts and pages won't it?

    From memory it won't import user accounts. It will only map exported user accounts to ones that already exist.

    I would still have to transfer the attachment files manually.

    Is there an easy way to transfer user accounts/roles from one installation to another?

    WordPress Cloner looks interesting - I'll have to check it out. It doesn't mention WPMU at all though.

    James

  5. jamescollins
    Member
    Posted 15 years ago #

    Just as a follow up, I asked the WP Cloner developers about this, and their response was along the lines of:

    WP Cloner allows you to clone from one server to one or multiple remote severs.

    It will clone posts, settings, users, plugins and all mysql data.

    Files are transferred via a server to server ftp connection.

    The db is first backed up then it is transferred FTP

    We have not tested the plugin with wordpress MU, however there are some users who have tweaked the plugin to fit their MU needs.

    It might be able to transfer one wp mu site to another, but again this has not been tested.

    On the rare occasion that I have to perform this WPMU -> WPMU migration, I am still manually performing the migration using similar steps to the above.

    It is quite tedious.

    Has anyone else managed to come up with a better solution?

    Thanks in advance.

About this Topic

  • Started 15 years ago by jamescollins
  • Latest reply from jamescollins