Moving WordPress site to New Server

If you need to transfer WordPress website to a new host while keeping the same domain name, then the process is fairly simple.

Server where the site is currently hosted:

  1. Access your cPanel and click phpMyAdmin icon.
  2. A list of all the databases will be displayed on the left hand side in a new window
  3. Select the WordPress database and you will notice that all the tables are shown in the right hand box
  4. Click Export (on the top bar) to export the data in SQL format
  5. Backup all the files associated with your WordPress site
    1. This can be achieved via FTP or
    2. You can use the File Manager under cPanel to make a backup
  6. By now you have a backup of your WordPress database and all the files of your site.

Server where the site is moving to:

  1. Access the cPanel of your new hosting
  2. Click MySQL Databases icon to access the Database options and follow the steps below:
    1. Create a New Database – make note of this name
    2. Create a New Database User and setup a strong password – make note of this too
    3. Add User to Database – Select the User and the Database and Click Add
    4. Select ALL PRIVILEGES and Click Make Changes button
    5. This will setup your database where we need to import the data now
  3. Go back to cPanel and click phpMyAdmin icon now
  4. On the phpMyAdmin page:
    1. Select the newly created database from the left panel
    2. on the right hand side top bar select Import
    3. click browse to select the backed up sql file and click Go
    4. this should import all the tables and the data to the newly created database.
  5. Upload all the files from the old server to the new server (most likely it is the root directory)
  6. Edit wp-config.php file
    1. this file is located in the root directory of your WordPress site
    2. you will need to update the following items in this file
      1. database name
      2. database user
      3. password
    3. Save this file and this should conclude your move.
  7. If for some reason you are moving this site to a different domain then you will need to make change in the wp_options table
    1. change the siteurl string to the correct URL in option_value
    2. change the home string to the correct URL in option_value