How to move wordpress site to a new Domain

In this tutorial I will explain how you can transfer your wordpress site from one domain to another. I’ll assume you are using cpanel web hosting.

  1. Login to your cpanel hosting and go to File Manager and select all the wordpress files and then click compress to create a backup (backup.zip) of your wordpress site.
  2. Download the backup.zip file by going to yourdomain.com/backup.zip
  3. Then go to phpmyadmin and on your left click on the database name and then click Export. Select Custom Export Method and choose Output “Save output to a file “ and then choose Compression “zipped or gzipped” and click Go. This will download the compressed database/mysql dump file.
  4. Extract the database file and then open it with an editor (e.g notepad++) and press Cntrl+H to replace all the occurrences of domain with the new domain name.
  5. Now login to your new hosting’s cpanel (If the new domain is hosted on the new hosting)
  6. Under Databases click on MySQL® Databases and create a new database for the new domain, Add new database user and then add that user to that database.
  7. Then go to phpmyadmin and on your left click on the new database that you created and click Import and then click Choose File to browse for the mysql file and then click Go. Database will be imported.
  8. Using ftp (Filezilla) upload the wordpress files (backup.zip) and then using File Manager in Cpanel, extract the zip file. You are in public_html folder, so when you will extract the zip file it will create a new folder backup in public_html so open this folder and move all the contents of this folder to public_html folder. If you have added the domain as an addon domain then move the wordpress files to its respective folder.
  9. Update the wp-config file with the new database details (database name, username and password)
  10. You are done with moving your wordpress site to a new domain

If you need help in moving your wordpress site to a new domain, Hire me on Odesk.