Moving a WordPress (WP) site to a new server or new domain name can be a little challenging and intimidating, so we decided to outline the steps the programmers at Northern Pride take when moving our client’s WordPress web sites. This guide is for experienced developers only, all others should consider hiring a professional programmer to properly move your WP site, otherwise you will risk losing your files and content forever. If you would like one of our programmers to move your WP site call us at 973-726-0003, we would be glad to move your site for you.

To move a WordPress site to another server or to a new domain name, you will want to do a full migration. We do not recommend using any WordPress plugins for this process, nor do we recommend using the WP export and import tool built into WordPress. We will be moving all the key content files and the WP database from the older server to the new, utilizing FTP and phpMyAdmin. When the process is complete, you will either re-point the domain name servers (DNS) if you will be using the same domain name or if you will be using a new domain name you would create a dns forward for the former domain name to the new one.

You should allow a minimum of 1 to 2 hours to complete the steps to transfer the site. You will experience some down time during the DNS propagation period, rule of thumb is to allow up to 48 hours, but most likely the new site will be visible much faster than that. Prior to moving the site, you may want to consider installing and activating the Maintenance Mode plugin to inform visitors that your website will be temporarily down.

Lets get started:

  1. DOWNLOAD THE ENTIRE WORDPRESS WP-CONTENT FOLDER & WP_CONFIG.PHP FILE
    Log in to your existing WordPress site using your ftp client and download the entire wp-content folder and the wp-config.php file to your computer. This files contains all of your WordPress customizations.
  2. BACKUP / EXPORT THE WORDPRESS DATABASE:
    On your original site server, log in to cPanel, or whatever server Control Panel  your server provides, locate and launch phpMyAdmin.
    Locate your WordPress database in the left sidebar and click on it. (If you are uncertain the name of the db being used, open the wp-config-php file to determine)
    Click on the Export tab along the top. Make sure “Save as File” is checked at the bottom and click on GO.
    You now have a copy of your WP database backed up on your computer, and will use this database file to upload to the new server.
  3. CREATE THE NEW DATABASE ON THE NEW SERVER:
    Create the new Database on New Server: Log in to cPanel or your server provided Account Control Panel and click on MySQL Databases, in cPanel it is located under the Databases section. Click on Create New Database. Name the database something like clientdomain_blog
    Create MySQL User: Next you will want to create a MySQL user and name it something like “clientdomain_clientname”. Then enter a  password, we recommend using a password generator to generate a secure password. If you are using LastPass, just right click in the password field and click on generate password.
    Add User to Database: Next, select the new user and select the correct database and click add. On the next screen that appears check All Privileges and strike the Make Changes button
    You can now return to the cPanel Home Screen
  4. IMPORT THE DATABASE TO THE NEW SERVER USING PHPMYADMIN
    From your control panel open phpMyAdmin located under the Databases section in cPanel
    Click on the newly created database name located in the left column sidebar
    Click on the Import Tab along the top horizontal navigation bar. Next, browse to locate  and open the downloaded database backup file, and strike Go to begin the import
    When the import is complete you should get a Green check stating the Import was Successful
  5. MODIFYING THE IMPORTED DATABASE
    Now that the database has been successfully imported you will need to modify it in order for it to work properly. This will be performed running SQL Query.
    Assuming your table prefix is wp_ click the SQL tab at the top
    You will need to run 4 SQL queries,
    Note: if you are moving the site from a prior subdomain (like blog.yourolddomain.com) to the root of a new domain you will need to run 8 SQL Queries. First with the subdomain name blog.yourolddomain.com in place of “olddomain”; when that is complete you will run the 4 SQL queries again this time with “yourolddomain.com” without the prefix “blog.”

    Copy and paste, one at a time, the following 4 strings of code into the Run SQL query box, replacing the words olddomain.com and newdomain.com with your domains, and strike Go. Each time you run a query you should get a green check indicating the database was successfully updated.UPDATE wp_options SET option_value = replace(option_value, ‘http://www.olddomain.com’, ‘http://www.newdomain.com’) WHERE option_name = ‘home’ OR option_name = ‘siteurl’; 

    UPDATE wp_posts SET guid = replace(guid, 'http://www.olddomain.com','http://www.newdomain.com');

    UPDATE wp_posts SET post_content = replace(post_content, 'http://www.olddomain.com', 'http://www.newdomain.com');

    UPDATE wp_postmeta SET meta_value = replace(meta_value, ‘http://www.olddomain.com’, ‘http://www.newdomain.com’);
    When complete click on the Home icon and log out of phpMyAdmin.

  6. INSTALL WORPRESS ON THE NEW SERVER
    On your computer, move the WordPress files into your local web site folder.
    Copy and paste the recently downloaded backup wp-content folder overwriting the folder in your clients local web site folder.
    Open and Edit the wp-config.php file with the database name, database username and database password. Save the file.
    Upload all the WordPress folders and files to the new server via ftp in auto mode.
  7. LOG IN TO WORDPRESS ADMIN ON NEW SERVER
    If prompted to update the database and/or WordPress, update now. If you enabled Maintenance Mode earlier, you can now turn it off.
  8. TEST OUT THE SITE TO VERIFY IT IS WORKING PROPERLY
    Launch your browser and check out your site, make sure all images are displaying and all your old features are still available.
  9. LASTLY, UPDATE DNS RECORDS

We hope this guide is helpful in moving your WordPress sites. To have Northern Pride move your WordPress site, contact us for a free estimate. Good luck!