How to move your WordPress site to a new server

Facebook
Twitter
LinkedIn

Migrating WordPress can be done in one of two ways, manually or using any number of plugins.  In this post we are going to look at how to manually move your WordPress site from one server to another, keeping the same URL.

Before starting any migration backup your site, while the backup is running make a note of the following information:

Current Server & Destination Server

  • FTP server address
  • FTP server user name
  • FTP server password
  • PHPMyAdmin URL
  • PHPMyAdmin user name (this can be found in the wp-config.php file)
  • PHPMyAdmin password (this can be found in the wp-config.php file)

Destination Server

  • Database server details

Once armed with this information we can start.

Existing WordPress Server

  1. Download all the files from your existing site
    Using your preferred FTP client connect to your current server and download ALL the files.
  2. Connect to PHPMyAdmin and Export the database
    Open the URL to PHPMyAdmin and login, click the Export button at the top and then click Go, a file called databasename.sql will be downloaded to your computer

New WordPress Server

  1. If you have not already done so, create the hosting space with the same domain name as the existing WordPress site
    Make sure you create an FTP account and note down the address, user name and password, create a new database,  user and password – make a note of these details
  2. Edit the wp-config.php file and edit the MySQL settings in RED to match the new settings
    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define( 'DB_NAME', 'asklh38' );
    /** MySQL database username */
    define( 'DB_USER', 'sdkljf79' );
    /** MySQL database password */
    define( 'DB_PASSWORD', 'akljh83m' );
    /** MySQL hostname */
    define( 'DB_HOST', 'localhost:3306' );
  3. Upload all the files that you downloaded from the existing server
    You do not need to install WordPress, the WordPress files will be contained within the files you downloaded
  4. Open PHPMyAdmin on the new server and import the database

Now you need to test, if you using a Mac or a PC you can edit the ‘hosts’ file and enter the following lines:

ipaddressofserver yourdomainname.tdl

Now close your browser and reopen it. Visit your website again, refresh the page and it should display the version on the new server. Check the whole site to ensure that everything is still working, all links etc work and all images show.

Once you are happy that everything is as it should be you need to update your A records, change all records on your name server that pointed to the old IP to the new IP. Just don’t close down the old hosting for 24 hours to enable your changes to the IP address to be replicated across the web.

Confused, questions?  Then why not ask us, alternatively we can migrate your site for you.  If you want us to host your site then migration is free!  Just click the button below to contact us.

Contact Us

Note: This guide assumes that your name servers, DNS records and email are not hosted on this package.  RocketWP accept no liability if things go wrong, always ensure that before doing any work on your WordPress site that you have a full backup.

More to explorer

Leave a Reply