Moving WordPress to a New Server Step by Step

Moving your WordPress website to a new server can be a daunting task if you don’t know the correct steps. Recently I designed a new WordPress site for a customer in the subdirectory of my own website before I moved it over to its own domain. Perhaps you’re not happy with your current web host and want to move your WordPress site to another web host. The move takes about 1 hour.

Steps for Moving Your WordPress Website to a New Server

1. Create a new folder for your old WordPress files

Name the folder”OLD” so you can easily find all files from the old website.

2. Backup the database of your old WordPress website

One of the easiest ways to backup your database and all your WordPress files on the server is to login to cpanel — files — backup wizard and click on the backup tab.

It’ll download a zipped copy of your entire website to your computer. The following files are included in the backup:

* Home Directory
* MySQL Databases
* Email forwarders configuration
* Email filters configuration

Create a subdirectory called “BACKUP” in the “OLD” folder so you can easily locate your backup files.

Alternatively you can backup the database using phpMYAdmin (cpanel — databases — phpMYAdmin)
Read How to Backup mySQL Database With phpMyAdmin

3. Download the WordPress files to your hard drive

Use FTP software like Filezilla to download the files from the server to the “OLD” folder on your desktop. You now have a backup of the old database plus all the files from your WordPress website.

4. Change the settings in WordPress

Log into the WordPress admin panel — settings — general settings and change both URLs to your new website address.

5. Create a folder for the new WordPress files

Name the folder “NEW” so you can easily find all the files from the new website. The purpose of downloading the files again is that the files and the database have changed due to changing the URLs to the new website address.

6. Download the database again

Create a subdirectory called “BACKUP” in the “NEW” folder so you can easily locate your backup files. Make sure you keep your old database.

7. Create a database and username on the new server

Log in to cpanel — databases — MySQL databases to create a new database and username for your new website.

8. Upload the new database to the new server

Upload the database created in step 7 to the new server. Here’s how:

Go to phpMyAdmin
Click on the database you created in the left-hand column
Click the SQL tab
On the “SQL” page, unclick “show this query here again”
Browse to the backup of the database on your computer
Click Go.

9. Edit the wp-config.php file

Open wp-config.php file in notepad and fill in the name, username and password of the new database you created in step 7.

10. Upload files to the new server

Upload all the WordPress files in the “NEW” folder to the new server (not the backup folder since you uploaded this already).

11. Change the nameservers

Change the nameservers to point to the new site. It generally takes about 24 hours (sometimes it’s immediate).

12. Test your website

Enter the URL of the new website in your browser. If it doesn’t display correctly go through the previous steps. Sometimes all the files don’t get uploaded correctly so you have to repeat the process.

If you want to keep your old WordPress website

Sometimes it’s a good idea to keep a copy of your old site on the old server in case something goes wrong with the new website.

Here are the steps to restore your old WordPress website:

1. Delete your old database

Delete your old WordPress database using phpMYAdmin.

2. Upload your old WordPress files to the original server

Upload all the files of the old WordPress website (“OLD” folder) to the original server. This will overwrite all the files that are currently there.

Alternatively delete all the old files on the server first then upload the files from your computer (“OLD” folder) to the server. This makes sure that you have all the files on the server.

3. Upload the database from your old WordPress website

Upload the database located in the “BACKUP” folder of your old site (“OLD folder) to the original server.

4. Test your website

When you enter the URL of the old website in your browser it should be displayed immediately.

**********************
Need help with Moving Your Website to a New Server?
Go to: Web Design in Maryland

Comments

  1. Hey, Thanks for this article, I was searching to migrate wordpress blog from 1 server to another server and I found your article and used the tips as you have mentioned. I used your steps and wow I did my job with 0 downtime.
    Thanks so much

  2. Upni…thanks for the feedback..glad to hear it worked for you.

Trackbacks

  1. […] Joomla among directories/subdirectories Moving WordPress to a New Server Step by Step How to Backup mySQL Database With phpMyAdmin How to add a database to a […]

Speak Your Mind

*