Help me move four very large Wordpress sites.
June 12, 2009 7:33 AM Subscribe
I need to move four large Wordpress sites from one host to another, and I'm scared at all the many ways it could go wrong.
We currently have four websites hosted in our building. All are running Wordpress.
The company has made the decision to switch to an off-site hosting company, an account has been setup, etc., and I'm tasked with moving the sites to the new host.
Here's the rub: The people that originally set up our in-house box put all four sites in the same MySQL database, with different table prefixes. Rub #2: These are extremely large sites, several of which have upwards of 50,000 posts.
So, how do I go about moving/implementing this beast? Setting up WP and moving the themes and all that isn't a problem. But how do I best move the data? Do I use a backup/restore plugin, or will that not work given the fact that they're all four in the same DB? Is there a better, safer way of moving MySQL data from one place to another?
We currently have four websites hosted in our building. All are running Wordpress.
The company has made the decision to switch to an off-site hosting company, an account has been setup, etc., and I'm tasked with moving the sites to the new host.
Here's the rub: The people that originally set up our in-house box put all four sites in the same MySQL database, with different table prefixes. Rub #2: These are extremely large sites, several of which have upwards of 50,000 posts.
So, how do I go about moving/implementing this beast? Setting up WP and moving the themes and all that isn't a problem. But how do I best move the data? Do I use a backup/restore plugin, or will that not work given the fact that they're all four in the same DB? Is there a better, safer way of moving MySQL data from one place to another?
Maybe those with more experience can either agree or correct me here, but shouldn't you attempt to get those individual websites into separate databases. That seems like a headache waiting to happen.
posted by Gravitus at 9:31 AM on June 12, 2009 [1 favorite]
posted by Gravitus at 9:31 AM on June 12, 2009 [1 favorite]
I agree with nitsuj. You'll want to do a backup (export) of the database, then import it to the new mySQL instance. It sounds like you'd like to split out the databases, but if you do decide to tackle that, treat it as a separate project for after you get everything up and running.
You've probably already seen this, but just in case: Moving Wordpress, from the codex.
posted by txvtchick at 9:40 AM on June 12, 2009
You've probably already seen this, but just in case: Moving Wordpress, from the codex.
posted by txvtchick at 9:40 AM on June 12, 2009
I'm in a somewhat similar position right now – I'm trying to take a few WordPress sites from multiple hosts with upwards of 30k posts and merge them into a single installation.
One option you might try would be to use the built-in WordPress Export and Import functions. That will preserve all of your important data (category structure, tags, metadata, comments, etc.) and allow it to be separated from the database.
Then you could reinstall the four WordPress sites on the new host (separately), reinstall themes and plugins, and then import the posts from the Import function.
posted by cvp at 9:42 AM on June 12, 2009
One option you might try would be to use the built-in WordPress Export and Import functions. That will preserve all of your important data (category structure, tags, metadata, comments, etc.) and allow it to be separated from the database.
Then you could reinstall the four WordPress sites on the new host (separately), reinstall themes and plugins, and then import the posts from the Import function.
posted by cvp at 9:42 AM on June 12, 2009
Also, a bit off topic, but be sure that you are upgraded with the most current versions. I just did a move and lost everything (for a while) because I had such an old version and tried to move it to a different server and update it to the current version at the same time.
(It was about a week long disaster. My host saved me there)
posted by Vaike at 10:09 AM on June 12, 2009
(It was about a week long disaster. My host saved me there)
posted by Vaike at 10:09 AM on June 12, 2009
I had the same problem just recently, but it was my own blog. Silly, I know, but I put all 4 blogs into the same database, with different prefixes. It took me about 2 minutes to sort using PHPMyAdmin (PHPMA).
Here is what I would do in your situation:
1] Use wp-db-backup to make a backup of your database. You can use it to make one big backup, or to make individual ones of each table prefix. Just do individual ones for each blog.
2] Log into PHPMA on the new server, and create a user for the first blog. Privileges > Add a new user > fill in the details. I created a database user name of foo with the table prefix bar_. Click on "Create database with same name and grant all privileges". Then click go.
3] Log in to that user, and upload the .sql file that wp-db-backup created. If it's over 10 megabytes, you'll have to use the command line. I have no idea about that.
4] On the new server, ensure you've entered the correct username details in wp-config.
It's pretty simple. I panicked the fisrt time I went into PHPMA, but as long as you don't click the big red drop button you'll probably be OK. Feel free to mefimail if I can help. :)
posted by Solomon at 10:54 AM on June 12, 2009
Here is what I would do in your situation:
1] Use wp-db-backup to make a backup of your database. You can use it to make one big backup, or to make individual ones of each table prefix. Just do individual ones for each blog.
2] Log into PHPMA on the new server, and create a user for the first blog. Privileges > Add a new user > fill in the details. I created a database user name of foo with the table prefix bar_. Click on "Create database with same name and grant all privileges". Then click go.
3] Log in to that user, and upload the .sql file that wp-db-backup created. If it's over 10 megabytes, you'll have to use the command line. I have no idea about that.
4] On the new server, ensure you've entered the correct username details in wp-config.
It's pretty simple. I panicked the fisrt time I went into PHPMA, but as long as you don't click the big red drop button you'll probably be OK. Feel free to mefimail if I can help. :)
posted by Solomon at 10:54 AM on June 12, 2009
It could actually be a good thing you've got it all in the same DataBase with different prefixes for the tables... some off-site hosts only want to give you one DataBase.
do what people above (Solomon etc) have suggested about the above: dump, move, "undump" (put old database in new location.)
Are these sites large not only in posts but in traffic?
Would it be ok to disable the sites for commenting so people don't lose comments in the transfer? (Ie, "shut down" for the move?)
posted by titanium_geek at 2:52 AM on June 13, 2009
do what people above (Solomon etc) have suggested about the above: dump, move, "undump" (put old database in new location.)
Are these sites large not only in posts but in traffic?
Would it be ok to disable the sites for commenting so people don't lose comments in the transfer? (Ie, "shut down" for the move?)
posted by titanium_geek at 2:52 AM on June 13, 2009
This thread is closed to new comments.
posted by nitsuj at 7:36 AM on June 12, 2009