Migrating a WordPress installation from one server to another
There comes a time when your once fast server needs to be replaced with a superior machine. In fact, this time comes fairly often for system administrators these days. Around here, our developers are also our system admins, so time is at a premium. This means that we stretch the lives our our servers as long as possible to avoid spending time transitioning web applications. On average our dedicated servers have a lifespan of 2 years before we start fresh again on the latest hardware and operating systems.
In this round of upgrades we are also consolidating our servers so that we have just one powerful linux machine and one powerful windows machine to run our 50+ websites. We are migrating most of our wordpress installations to our linux server since PHP application are more at home on a linux box, although several of our wordpress installations will still be living on our windows server to be contained under certain domains.
The process of moving a wordpress installation is fairly straight forward, but it always helps to have a simple step-by-step to work from.
- Ensure that nobody will be making changes to your current installation while you’re moving the site.
- Create an archive of the current site directory. Under linux, use:
tar -zcvf your-wordpress-install.tar.gz /var/www/yoursite
(where /var/www/yoursite is the path to your website)
- Download the site archive file using an FTP client
- Upload the site archive to your new server and extract it. Under linux, use:
tar -zxvf your-wordpress-install.tar.gz -C /var/www/yournewsite
- Export the MySql database for your site. I’d recommend using the MySql GUI Tools to both export the database and import the database into the new server.
- Import the database into the new server.
- Set the sites DNS to point to the new server’s IP address.
- Turn off the old site to avoid any data consistency issues.
Latest posts by Matthew Mombrea (see all)
- Setting up the Android Google Volley ImageLoader for NetworkImageView - October 8, 2013
- Hacked? Here’s How To Remove The Dreaded Google Malware Warning - March 21, 2013
- How to sort alphanumeric values with jQuery and C# - October 25, 2012
- Time Flies & Terrible Lies: July Content Marketing Ideas…NOT
- Candy, Cabins & Color TV: June-ified Content Marketing Ideas
- Packrats, Playoffs & Plenty Of Flowers: May Content Marketing Inspiration
- Fools, Frogs & Furious 7: April Content Marketing Ideas
- Friendship, Fat Tuesday & The Fish Bowl: Content Marketing Inspiration For February
- My First Semester Teaching: CSIT 330 – Mobile Application Development on
- Setting up a small office or home office VOIP system with Asterisk PBX – Part 4 on
- Setting up the Android Google Volley ImageLoader for NetworkImageView on
- Social Media Cover Photo Cheat Sheet & All-In-One Social Template Download on
- How to Add External Links in YouTube Video Annotations on