Checklist for moving an existing WordPress site to a new web host
A checklist for moving an existing WordPress site to a new VPS web host, when you have full admin rights over the server.
- Set DNS TTL’s down to 5 minutes (a few days prior to the move). This will allow the nameserver update to propagate more quickly.
- Set up new domain on the new host (Checklist for setting up a new domain on your VPS)
- Install WordPress on new host
- Copy old content directory to new WordPress host
- Copy old database to new host (how to use secure copy to copy database to new server)
- Update wp-config on new host
- Enable mod_rewrite in Apache on the new server. From the command line:
- Restart apache
/etc/init.d/apache2 restart
- Test that everything works (you can change your host file to test things out easily)
- Update registrar to point domain to the nameservers for the new host
a2enmod rewrite
Related: create a new database and run .sql file – Display text based on if it is the WordPress blog home page
If WordPress is up to date you could also just copy over everything for steps 1 and 2. I am using this for several sites I have had for years, I figure starting with a clean install of WordPress is a good idea, but it is not necessary.