Saturday, 1 March 2014

How to Move Your WordPress Database to Another Server

Hi, in my previous post titled - How to Move Your WordPress Blog to Another Host Using SSHI showed you how to move your WP blog files to another host server using SSH. SSH file transfer is an easy, fast and efficient way to move your blog from one host to another without using your DATA Bandwidth but unfortunately, SSH File transfer does not support moving of website databases across different servers, this means you have to move your WP blog database manually with SSH does the files transfer automatically.
By now, I assume you might have moved your blog files by following my first tutorial; your blog files is resting on your new server and all that is left is to move the database and complete your transfer process.
Without much ado, let’s see how to transfer your WordPress database to another server or host. 

Step 1 – Login to Your Cpanel

The first thing you need to do in other to transfer your blog database to a new server is to login to your blog Cpanel. The Cpanel is where you have access to all your website files and modify things on your blog.
Usually, you should be able to access your by going to your-domain.com/cpanel or cpanel.your-domain.com depending on your webhost settings.
 cpanel login 300x225 How to Move Your WordPress Database to Another Server
Once you get to your Cpanel login page, enter your login details and sign in to your Cpanel dashboard

Step 2 – Locating Your Database

Once you get into your Cpanel Admin area, the next thing is for you to locate your database files. You can do this by scrolling down your Cpanel dashboard page till you get to the database section.
At the database section, click on “phpMyadmin” link, this should open a new window. This new window is where you will be downloading your database.
 cpanel database2 How to Move Your WordPress Database to Another Server

Step 3 – Downloading Your Database

Your new window should look like the image below, and on this page, all you need to do is to look at the top navigation and click on the “databases” tab; this will bring up the list of the databases on your server.
Please note that the number of databases that will come up depends on the amount of sites that you are hosting on your account, if you are hosting just one blog on your hosting account, you will definitely have just one database showing.
Select your blog database from the list of databases shown to you and the tables/contents of the database will come up, at the top navigational bar; you will see the “Export” link staring at you over there.
 database content How to Move Your WordPress Database to Another Server
Click the export link and a page like the one below will show up, you don’t need to adjust anything, just click “GO” and your database will begin downloading on to your PC hard drive.
 database export 300x173 How to Move Your WordPress Database to Another Server

Step 4 – Uploading the Database to Your new Server

Once you are done downloading the database to your hard drive, the next step is to upload the database to your new server.
To do this,
 bloggers forum banner How to Move Your WordPress Database to Another Server
  1. Login to your new server Cpanel, if you don’t know how to do this, then go back to step 1.
  2. Scroll down to the database section (as explained in step 2 above)
  3. Click on “MySql Databases”, this will take you to a new page where you can create a new database.
  4. Enter a name for your database and click Create
  5. After creating your database, go back to the MySql database page again, and scroll down this time till you get to the MySql users section. In this section, create a new user for your database and after creating, go to “add user to database” to add the new user to your blog database that you created above.
  6. After that is done, go to your new server Cpanel home/dashboard and scroll down to the database section, and Click on “phpMyAdmin” and this will open a new window again.
  7. On the Phpmyadmin window, click on database from the top navigation like we did before and you should be able to find the database you created listed there.
  8. Click on this database and page containing its content will come up, once this page shows up, just click on “Import” from the top navigation bar.
  9. Click on “choose file” and select your database that you previously downloaded to your hard drive. Don’t tamper with any other settings on this page, just scroll down a bit and click the “GO” button.
After clicking the Go button, your database upload will begin. Wait for a few minutes for the database to be uploaded to your new server.

Step 5 – Editing your WP-CONFIG FILE

You will need to edit your wp-config file when moving your blog to a new server because you will surely have a change in the database name and database username and you need to update your WordPress configuration with the new settings before your blog and work again!
Doing this is quite easy, just look for the file manager under “files’ on your Cpanel home. A new window should open, at the new window; you should see a list of all your blog files.
 file manager How to Move Your WordPress Database to Another Server
Scroll down till you find the “wp-config” file, right click on it and select “Edit”; I mean just “Edit” and not “edit code”!
A new editing window should open and from there, you can edit your wp-config file. The only thing you need to change in this file is the database name and password which you did set earlier in Step 4.
Once you update this file, click on “save” and you are done with the transfer of your blog to a new server.
All things being equal, if you have changed your domain name servers to your new host name servers, then your blog should be working perfectly well.
If you have any questions or problems as regard this tutorial, drop it in the comments and I will gladly help you out.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.