Home > Blog > Wordpress tutorials > Move WordPress to another host

Move WordPress to another host

move wordpress

Before you move WordPress

Usually when we are re-branding or we are changing our hosting provider , we  need to move our WordPress  site completely from one domain (or host) to another. for some this seems like a hard job but it can be done in 10 to 20 min if you know what you are doing , in this tutorial we are going to through the process step by step on how to (migrate) move wordpress from one domain (or host) to another . but before we start we need to check couple of things to insure a safe transfer of our website

Before we start :

  • deactivate any antivirus or fire wall plugins installed on your website, this is because many of this plugins hard code your url in there files and not in the database which might cause issues when you try to open the site in the new URL
  • Deactivate any caching plugins as well
  • make sure that the new domain and host you are trying to move to is ready for your site (sometimes new domains needs up to 48 hours to be activated all over the world)
  • make sure that you backup the site completely before you start this process

Ok , all set lets go …

Video Tutorial :

STEP 1 : Download your site to your local machine

in this step you need to download all the files of your site to your local machine to move WordPress to the new location ,

  1. login to your c-panel (c-panel is a control page usually provided by your hosting provider)
  2. look for the icon “File Manager” and click it
  3. select the domain that you want to migrate and click “go”
  4. when the file manager page opens high light all the files and folders and then click “compress
  5. give your compressed file a nice name and click “compress files
  6. reload the view if you dont see your compressed file there
  7. double click on your compressed file to download it , or high light it and click the button “download

note : if you are migrating from your local host , you can find your files on your local machine on the “www” folder

STEP 2 : Export your database

in the step we need to download the database to our local machine or computer

  1. login to your c-panel
  2. find the icon “phpMyAdmin” and click it
  3. on the left side bar select your database
  4. check the check box below the tables “Check all
  5. from the drop down menu next to it select “Export
  6.  Select “Quick – display only the minimal options” then click on the “Go” Button
  7. now your database would start downloading

STEP 3 : Replace all the old URLs in your database with the new one

now its time to replace your old domain with the new one inside the database

  1. open the downloaded database (in step 2) with your favorite text or code editor
  2. lets assume that your old domain is “http://www.olddomain.com” and your new domain is “http://www.newdomain.com“. use your text editor “Find and Replace” to do the following :
    1. Replace :   “http://www.olddomain.com With “http://www.newdomain.com
    2. Replace:    “olddomain.com”  With “newdomain.com
    3. Replace:    “http://olddomain.com” With “http://newdomain.com
    4. Replace:    (if your domain contain any spacial characters) search for possible hex values in your old domain for example : http%3A%2F%2Fwww%2EoldDomain%2Ecom and make sure to replace it. a good reference site for hex table
    5. save your database file
    6. all done

STEP 4 : Creating the new database

On your new site location , its time to create the new database

  1. go to your c-panel (c-panel is a control page usually provided by your host)
  2. find the icon “MySQL Databases” and click it
  3. find the “Create a New Database” section then type the database name (ex: myBlogDB) and press “create database”
  4. now on the same page you should find a section called “MySQL Users” , create a user there and make sure that you have a strong password
  5. now once the you are done creating the database and the user its time to connect them together, on the same page find the section “Add a User to a Database” select the database and the user then press “add
  6. Select all privileges , and click “Make Change” button
  7. do not forget to keep the database, username and password information somewhere as we will need them in a while ????

STEP 5 : Upload your modified database to the database you just created

now since we created the new database its time to move WordPress database to its new location

  1. login to your c-panel
  2. find “phpMyAdmin” and click it
  3. on the left sidebar find your newly created database name and click it
  4. on the menu bar on top find the “Import” tab and click it
  5. on the “File to import” section you will find a “Choose File” button , click it
  6. select the database you have modified in step 3
  7. click “Go
  8. now all the tables from the previous site have been imported

STEP 6 : Upload your wordpress site to the new location

now its time to move wordpress files to its final destination

  1. login to your c-panel
  2. fine the “File Manager” icon , click it
  3. Select your domain (new domain)
  4. on the file manager click “upload” and select your zip file downloaded in step 1
  5. once its uploaded highlight the compressed file (zip file) and click “Extract

STEP 7 : Modify the ``wp-config.php`` file with the new database information

now we need to modify the wp-config.php file found on your site root folder

  1. high light the “wp-config.php” file and click “code editor
  2. find these three lines
    define('DB_NAME', 'your old database name');
    define('DB_USER', 'your old database user name');
    define('DB_PASSWORD', 'your old database password');
  3. now replace your old database information with the new one created in step 4
  4. save the file

STEP 8: The final step

now we are almost there , the site should be running fine in the new location but some links might be broken when you move wordpress

  1. login to your WordPress admin panel
  2. head to Settings ->Permalinks  
  3. do not change anything , just click save
  4. activate your antivirus , firewall and cache plugins
  5. Congratulations , you have successfully migrated your WordPress site 🙂

Trouble shooting:

If you faced any issues or the site is blank or links are broken , or maybe some images is not appearing when you move WordPress do the following

  1. try to deactivate all plugins and if the site is working , activate them one by one to see which plugin is causing the issue
  2. try to export your old database again and do more careful “Find and Replace” operation of your old URL with the new one
  3. try to use some developer tool to search all files on your site for hard-coded URL and replace it if found
  4. delete your “.htaccess” file found on your site root folder
  5. compare both servers for missing configurations , seek your hosting provider assistance

Kindly contact us on info@go2-tec.com if you have any questions, we also provide migrating WordPress site services and we can assist you in doing it.

if you like this post kindly share it so others can make use of it

Thanks 🙂


Enter your email address to subscribe to this blog and receive notifications of new posts by email.


GO2 Technologies

GO2 Technologies