There are a few backup/etc plugins out there will help you transfer a site from one domain to another or from a development site to your production site. I like to do this process manually and use the following steps:

Banner for General About Paid Memberships Pro Guide

Steps to Manually Move a Site from One Domain to Another

  1. Backup the files of the site. If you can SSH into the server, you can run this command from the root directory. Or just download all of the files over FTP.
    • # tar cfvz mysite.tar.gz *
  2. Backup the database of the site. Do an export from phpMyAdmin, use a plugin like “WP DB Backup”, or run this from the command line:
    • # mysqldump -u{db user} -p{db pass} -h{db host} {db name} > mysite.sql
  3. Upload the files to the new server. If you upload the tar.gz file from step 1, you can untar it like
    • # tar xfvz mysite.tar.gz
  4. Create a new database on the new server.
  5. Import the DB backup. Again you can use something like phpMyAdmin or upload your .sql file to the server and run this line from the command line:
    • # mysql -u{db user} -p{db pass} -h{db host} {db name} < mysite.sql
  6. Update wp-config.php in the root folder to point to the new DB location/name/user/pass.
  7. Download and install the Search Replace DB script from Interconnect IT.
  8. Navigate to /searchreplacedb2.php on the new domain. Follow the instructions to select all DB tables.
    • Search for olddomain.com
    • Replace with newdomain.com
  9. Your site should work great now when navigating to newdomain.com.
  10. VERY IMPORTANT: Delete the searchreplacedb2 file and any of your .tar.gz or .sql files from the server. (Or move them outside of the site root so they can’t be downloaded or executed.)

Was this article helpful?
YesNo
Posted in . Bookmark the . Last updated: .