A Step By Step Guide To Move WordPress Site To New Web Host

0
A Step By Step Guide To Move WordPress Site To New Host
A Step By Step Guide To Move WordPress Site To New Host

A Step By Step Guide To Move WordPress Site To New Web Host


In this tutorial, we will show you how to move WordPress Website from one server to another server. There are 8 steps in this tutorial, each step of this tutorial is very important to move WordPress Website to a new Web Host.

1. Back Up Your WordPress Website’s Files

A Step By Step Guide To Move WordPress Site To New Host
A Step By Step Guide To Move WordPress Site To New Host

Login to your server, and backup every file of your website. This step is good practice before any major change but it is also a requirement of moving your WordPress installation.

FTP

There are many plugins available on the internet at no cost that will completely backup your site for you.

This backup requires a more manual approach. Using an FTP ( File Transfer Protocol ) program ( such as FileZilla ), connect to your web host and copy all files to your website’s directory to a folder on your local computer.

cPanel

If your old host is using cPanel, you can use the File Manager tool to create a .ZIP archive of all your site files. You can then transfer it to your new host and extract it. This will save you time because transferring one big file is much faster than transferring thousands of small ones.

This includes the .htaccess file that is set to be hidden. Consult your FTP program’s help file to have it display hidden files if you are unable to see this file.

2. Export The WordPress Database From Old Host Server

The second step is to move your database. First, you need to export your database from the old hosting account. You can safely follow these instructions.

A Step By Step Guide To Move WordPress Site To New Host
A Step By Step Guide To Move WordPress Site To New Host

Login to the cPanel account of your web server and open the phpMyAdmin application. Select the database that contains your WordPress installation from the list on the left-hand sidebar and once selected click on the Export tab on the navigation menu.

The default settings of a Quick export and the SQL format for the export are sufficient for what we need. Click the Go button and the database export process will begin and a file will be downloaded to your local computer.

3. Create A New Database On Your New Host Server

  • Login to your new web host, Open MySQL Database and create a new database.
  • Create a new MySQL user (with a secure password).
  • Add this user account to the new database and grant it All Privileges.

Note down all the details in notepad, as we will need it later to make changes in the wp-config file.

4. Import Your Database To New Server

A Step By Step Guide To Move WordPress Site To New Host
A Step By Step Guide To Move WordPress Site To New Host

Go to Database > PHPMyAdmin >Select the database from Left side > Import and upload the backed up database file from old hosting.

Un-tick the Partial Import check box, make sure the format is set to SQL and then click the Go button. The database import will now begin.

5. Edit the wp-config.php File

A Step By Step Guide To Move WordPress Site To New Web Host
A Step By Step Guide To Move WordPress Site To New Web Host

Once it’s done, all you need to do is edit the Wp-config file the access between WordPress and your database and add the database information that we created above: Browse to the folder on your local computer where you downloaded your WordPress website files. In that folder, there is a file called wp-config.php, edit the following details:

Change The Database Name

Find the following line:

define('DB_NAME', 'db_name');

The db_name portion of this line will currently be set to the MySQL database name of your old web host. This must be changed to the name of the new database you have just created.

Change the Database Username

Below this you will find the line:

define('DB_USER', 'db_user');

In this line, you need to change the db_user portion from the username of your old host to match the new username you have just created.

Change The Database User Password

Now, edit the third line:

define('DB_PASSWORD', 'db_pass');

The db_pass section of this line must be changed to the new secure password you created for your MySQL user on new Host.

Save wp-config.php and close the file.

6. Upload The WordPress Files To Your New Host

Now, open FTP and login to new hosting FTP. Upload all the file (Backup from the old host) to your new hosting. If this is the primary, or only site being installed on this web server then uploading the files to the public_html folder is the usual directory.

With the remote directory selected you can upload your website files, that should now include the updated version of wp-config.php.

7. Linking to New URL & Defining New Domain

  • Backup your database and save the copy off-site.
  • Login to phpMyAdmin.
  • Click the link to your Databases.
  • A list of your databases will appear. Choose the one that is your WordPress database.
  • All the tables in your database will appear on the screen.
  • From the list, look for wp_options. Note: The table prefix of wp_ may be different if you changed it when installing.
  • Click on the small icon indicated as Browse.
  • A screen will open with a list of the fields within the wp_options table.
  • Under the field option_name, scroll down and look for siteurl.
  • Click the Edit Field icon which usually is found at the far left at the beginning of the row.
  • The Edit Field window will appear.
  • In the input box for option_value, carefully change the URL information to the new address.
  • Verify this is correct and click Go to save the information.
  • You should be returned to your wp_options table.
  • Look for the home field in the table and click Edit Field. Note There are several pages of tables inside wp_options. Look for the > symbol to page through them.
  • In the input box for option_value, carefully change the URL information to the new address.
  • Verify this is correct and click Go to save the information.

8. Final Step

Once you are sure about everything is working fine, go ahead and update Domain name servers to point to new hosting.

After migrating MySQL database, you will notice some weird character in your WordPress blog in the new host. For example, characters like Ð and Æ.

You can use Search and replace WordPress plugin, to find all such weird characters and replace them altogether.

LEAVE A REPLY

Please enter your comment!
Please enter your name here