Select Page

How To Move Your WordPress Website To A Different WordPress Hosting Server

Moving Your WordPress Site To A New WordPress Hosting Server

Step 1: Backup Up Your Files and MySQL Database on your WordPress Hosting Account Before You Start So You Have a Roll Back Plan

Create a temp directory on the old server and copy all the WordPress files to that new temp directory.  Then zip up all the files in this temp directory.   Now download this zip file to your PC.

Open up PHPmyAdmin on the old server and click on the database on the left and then click on the EXPORT link at the top.  It will open an dialog box, so choose the CUSTOM radio box selection and choose the SAVE OUTPUT TO A FILE  radio box selection and then click on the GO button at the bottom of your screen.  It will ask you where you want to save the MySQL database export file on your PC so save the file adding today’s data and time in the file name in case you have to redo a mySQL DB export.

Step 2: Upload WordPress Files to a Different WordPress Hosting Server

Login into your New Server’s control panel and add the name of the website as a new domain even though the domain DNS is still pointing to the old website location. (Don’t click on the Install WordPress button since we are doing a manual install here.)  You might get a warning that this domain’s DNS cannot resolve on the new server which is fine as you have not changed the DNS to point at the new server yet as that is one of our last steps in this post.  In the new server’s control panel’s domain project you just set up,  look file for the FILE MANAGER and create a temp directory in the FILE MANAGER called Temp_uploads.

Your new server’s control panel should have an option to upload a file so navigate inside the new Temp_uploads folder in FILE MANAGER.  Click on the UPLOAD option to upload the WordPress zip file(s) from the zip file(s) on your PC.  Then click that uploaded file and choose the UNZIP or UNPACK or EXTRACT button to unzip all the files in the Temp_uploads folder to see if everything is there.   You will be moving the files again to the proper location (such as the folder with your domain name or in other cases the httpdocs folder.  )

Before you move the WordPress files click on the httpdocs folder or the domain name folder which is the destination folder for the Temp_uploads loaded files, and see if there is any duplicate folders or files names, and if so, rename files like index.htm to indexOriginal.htm and an images folder to ImagesOriginal so that when you move the files from httpdocs folder you wont have any file name crashes on duplicates.

 Step 3: Move WordPress Files to Correct WordPress Folder.

Navigate back to the Temp_uploads folder, select all the extracted files (except the zip file(s)) and in the control panel click on the MOVE function and move all those files to the proper WordPress Folder mentioned in step 2.  Repeat this last sentence if there are more than 1 zip file you uploaded from your PC.

Step 4: Creating MySQL Database on Your New WordPress Hosting Server

Click on the control panel’s option to create a new MySQL database.  You will be asked for a DB Name, a DB User and a DB Password.  Copy and paste these 3 pieces of info to your notepad. When creating a DB user make sure the user has either admin role privileges or read/write permissions depending on what control panel options you have.  When creating the password, use the GENERATE password button (if there is one), and click on the SHOW PASSWORD button and copy that database password into your notepad.  When you have completed the creation of this new MySQL database the control panel should give a PHPmyAdmin link to that new database.

Click on that PHPmyAdmin icon or link and then when the new tab opens up in your web browser, click on the IMPORT option link at the top of the screen which will open an IMPORT dialog box on your screen.  You want to upload the MySQL file export you did in step 1 so click on the Upload or File Browse button and point it to the MySQL file export on your PC and then click on the GO button at the bottom of that screen.  This could take a few minutes so be patient.  When it is completed you should see all the tables on the left panel of your screen.

Step 5: Updating your wp-config.php file in your main or root folder in your FILE MANAGER

Navigate to the httpdocs or domain folder or main/root folder in your FILE MANAGER and look for the wp-config.php file in the root folder.  Click on that file to edit it (you might see a pencil or edit icon in some control panels to edit that file).  When the wp-config.php file opens up, you will see a section in the file such as below.  You will replace A, B and C, with the info you copied to your notepad in step 4.

Open up a new browser tab and copy this URL into the new tab,   and cock enter to view the browser screens 8 rows.  Copy all 8 rows in that web screen to the section D below and then save your changes to the wp-config.php file.  Fill in these sections with your custom info shown below in your wp-config.php.

/** The name of the database for WordPress */

define(‘DB_NAME’, ‘A’);

/** MySQL database username */

define(‘DB_USER’,       ‘B’);

/** MySQL database password */

define(‘DB_PASSWORD’, ‘C’);

/** MySQL hostname */

define(‘DB_HOST’, ‘localhost:3306’);

/** salt keys================================== */

define(‘AUTH_KEY’,         ‘=D’);

define(‘SECURE_AUTH_KEY’,  ‘=D’);

define(‘LOGGED_IN_KEY’,    ‘=D’);

define(‘NONCE_KEY’,        ‘=D’);

define(‘AUTH_SALT’,      ‘=D’);

define(‘SECURE_AUTH_SALT’, ‘=D’);

define(‘LOGGED_IN_SALT’,   ‘=D’);

define(‘NONCE_SALT’,       ‘=D’);

Step 6: Update Your Domain

You are ready to test your files and your new mySQL database on the new WordPress server so look for a preview button.  Click on the preview button and your new web browser tab should look like the same home page on the old server.   (If not we have a link Tips When Moving WordPress Site to help you solve any issues.)

Step 7: Update Your Domain DNS info

Get the URL, Username and Password to the domain registrar web location that holds your domain information and DNS information.  Login in to that domain registrar account and copy down the existing settings of the domains DNS including name servers and an A Records.  Before you change the DNS to point it to the new server’s location you will need to ask 3 questions:

  1. a)       Does this domain have active email accounts on it and do those email accounts use web mail or do they download all their email to their PC with some PC client like ‘Microsoft OUTLOOK’?  If they use web email you have to plan the move carefully possibly in 2 phases where you move the website in phase 1 and later move the email accounts if required as phase 2.
  2. b)      Does this website have a ton of traffic or little traffic and if little traffic, can the DNS changes be moved during the weekday vs the weekend or night shift?  There are ways to move WordPress sites with no down time if you know about host files but that is not covered in this post.
  3. c)       Are you going to keep the email as is or are you going to set up matching email accounts on the new WordPress Hosting server?

Once you have the answers to the above you can move ahead and change the DNS records at a time that works with all people involved.  If you have no email accounts you can change the names servers to what is shown in the next paragraph.    If you are not sure about emails account and want to just change the website without any changes to email accounts, you can add/edit an A record in the DNS.  You can get the IP from your new WordPress Hosting Server.  Log into your existing domain registrar account for the domain of the WordPress site, record the existing A record if there is one, and then Change (or add) the A record to the new IP from your new WordPress Hosting Server.  After the A record propagates with the new IP address, your website will come up on the new WordPress Hosting Server .  (If not we have a link to Troubleshooting Tips When Moving WordPress Website to Another Server or Hosting Provider to help you solve any issues.)  To check if the new IP has propagated, open up a DOS (or CMD prompt) on your PC and enter at the dos prompt:  nslookup yourdomainnme.extension and you will see what IP your domain for your website is pointing to.

Once your website is up and you want to move all of DNS including email over to point at the new WordPress Hosting Server you change the DNS name servers in your domain registrar account to the new name servers.  You will need the name server information from your new WordPress Hosting Server which is usually a couple of URLs that look like this:

Record the existing name servers before you change the name servers to the new ones.  Test again after propagation.

Sometimes the new website on the new WordPress Hosting Server shows a blank screen, a 404 screen, a database connection error or some other issue, so we have compiled a list of over 10 tips to help you get your website up quickly:  (Tips When Moving WordPress Site )

Have fun!

How We Can Help

Sozo Hosting has been a leader in hosting solutions since 2001 and can assist you in your server needs.  Whether you need a cloud server (see specials on this  link)  or a shared WordPress hosting plan  (see specials on this   link ), we are here to provide you Managed Hosting and Managed Services to fit your budget!   Please click on this contact link  for more information.