Migrating a WordPress installation from one server to another

server
POST
mmombrea-headshot
By Matt Mombrea
Share

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.

  1. Ensure that nobody will be making changes to your current installation while you're moving the site.
  2. 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)

  3. Download the site archive file using an FTP client
  4. 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
  5. 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.
  6. Import the database into the new server.
  7. Set the sites DNS to point to the new server's IP address.
  8. Turn off the old site to avoid any data consistency issues.
Once the new site is up and running, ensure that the common permission based function are working, namely permalinks and image uploads.
POST
mmombrea-headshot
By Matt Mombrea
Share

0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Meet the Author

mmombrea-headshot
CTO / Partner

Matthew Mombrea

Matt is our Chief Technology Officer and one of the founders of our agency. He started Cypress North in 2010 with Greg Finn, and now leads our Buffalo office. As the head of our development team, Matt oversees all of our technical strategy and software and systems design efforts.

With more than 19 years of software engineering experience, Matt has the knowledge and expertise to help our clients find solutions that will solve their problems and help them reach their goals. He is dedicated to doing things the right way and finding the right custom solution for each client, all while accounting for long-term maintainability and technical debt.

Matt is a Buffalo native and graduated from St. Bonaventure University, where he studied computer science.

When he’s not at work, Matt enjoys spending time with his kids and his dog. He also likes to golf, snowboard, and roast coffee.