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