Recently I faced a big issue with my hosting company (not using them anymore). Because of that my site was on border of  getting de-indexed from search engine indexes. I was telling them the exact problem with all the technical solutions but they were behaving like they don’t care about clients. After 3 days of tensed period, I decided that lets move wordpress blog to new host. I called up a friend regarding the issue then he suggested me that if you need to do something big with your blog then you need to get a better hosting. Obviously, I am a professional blogger and can’t suffer with these technical glitches anymore. I mean, you have a great post in mind to write for your readers and you can’t write it because your hosting company don’t letting you to do it. Shit man!!

What was the issue?


If you are interested in what caused me to change hosting company for this blog, then read this section otherwise proceed further.

When I updated this wordpress blog to the latest version (3.5.1) then google webmasters tool have stopped accepting the sitemap. I tried resubmitting the sitemap many times, but no success. It was giving me different errors. Sometimes it was saying  Network Unreachable : Network Unreachable and sometimes Network Unreachable : robot.txt error. In both the cases it was not accepting the sitemap. I have read everything available on the web and made several changes to the blog like disabling all plugins, changing robot.txt etc. I had done almost everything but nothing had happened.  No clue what was happening.

I followed my mom’s advise and left it for the day. She always says, if you not able to do something which is causing some kind of tension then leave it for few hours or for the day. I enjoyed rest of my day without doing anything and slept like nothing had happened.

Next Morning I got a clue:


I don’t know who said this in my mind but I made a little change to the blog url within wordpress panel. Earlier I was working with http://pickthetrick.com and I changed it to http://www.pickthetrick.com (non www version to www version). I knew that it was not a good idea because this change will void all my backlinks and it will be a site with no backlink (or I need to apply a permanent redirect to all my blog posts ). Remember  site with www and without www are considered different.

I did this to check whether it will work now? I made a new webmasters account, have added the site with www version (yes, you need to verify the site by various methods, I have added a meta tag). And finally submitted the sitemap. With all surprised, it worked. That made me sure that there is nothing wrong with my site but there is something wrong with the hosting. I told them the whole story and gave few suggestions to resolve the issue but after 2 days nothing had happened.

That was the story behind switching the web hosting server.

How to Move WordPress Blog to New Host


In layman terms if I needed to describe it then I need to move my files and database to the new hosting. Partially correct, but we need to make certain changes too. Don’t worry they are very easy.

Step 1: Download database of your blog.

How to download your blog database?

First of all, you need to know what is your database name then only you can download all of its tables.

move wordpress blog to new host

NoteDown all the parameters like: DB_NAME, DB_USER, DB_PASSWORD. We will need them while transferring our files.

STEP – 2 : Download Database

Now as you know the name of your database then its quite easy to download the database. Under your cPanel click PhpMyAdmin.

You will be redirected to your database.  Look at the left side for your database and click the one which you have noted in step 1.

Now look at the upper section of panel and click Export:

Export method: Quick

Format : SQL

Click Go

This will download your database to your computer.

STEP – 3 : Download your wordpress files (all of them)

Go to file manager -> -> Select your domain -> Note down the folder from upper left section here folder name is pick-trick -> click -> navigate the folder there -> right click and select compress.

Compression type -> Zip archive and click “Compress-Files” . It will take few seconds.

Now find the zip file -> right click -> download.

STEP – 4: Upload Database to new Hosting

Within new hosting : Go to (MySQL Databases) and then you need to do three things here.

1) Create a new database : Write Down the name of your new database. Its not necessary that you need to keep the same name which was of your old database.

2) Create a new user with a password: Note down both username and password.

3) Assign all permission of newly created database to the newly created user. For that you will find “Add user to database” on the same page. Give all permissions and you are done with STEP 4.

STEP – 5: Uploading Old Database Tables to New Database

Don’t worry its very easy.

Again go to phpMyAdmin select the newly created database from the left panel. Now click Import from top -> Choose the file and click Go.

Your tables will be updated to your database and you are done with STEP – 5

STEP -6: Uploading files to New Hosting

Remember we have downloaded a zip file which contains your wordpress files.

Within your new hosting account go to file manager. Go to root folder (public_html) and upload zip file here. Once its uploaded, right click on the zip file and extract it. This will create a folder with all your wordpress files. Step – 6 is complete.

STEP – 7: Making changes to wp-config.php file

Now we have a new database with a new name and a new user with a new password. Open wp-config.php file within your newly uploaded folder and make changes.

Change DB_NAME, DB_USER and DB_PASSWORD with new values.

Save the file and you are done with step 7.

With this step you have migrated everything but point to be noted here is still you haven’t told the domain name that your site is now on a different server.

Its time to change the name server but before that we need to add an addon domain on new hosting panel.

STEP – 8: Adding Addon domain in new hosting

Its very easy too. Within your control panel click (Addon Domains) .

Fill in all the details. Let me brief you about them too.

Domain Name: If your domain name is www.sitename.com then enter that or if its without www then enter without www version (sitename.com).

FTP Username: System will fill automatic a name based on your domain.

Document Root: This is important. You need to write the folder in which your wordpress files resides. Hope you understand this otherwise comment below this post.

Password: This will be your FTP password.

Finally click Add domain and you are done with STEP – 8.

STEP – 9: Changing Name Server

When you book a domain you book that with a registrar. Go to the domain control panel, this will be the place where you have booked your domain. Its different from cPanel. For example, if you have booked a domain with godaddy then go to godaddy. There you have to change name server.

Your new hosting will provide you name space of their server. Which you will enter in domain settings.

You need to replace old name server values with new namespace values. This will replicate all over the web and signifies that this domain has a site hosted at a server which is being handled by this new name server.

NOTE: Once you update name server, it will take around 24 to 48 hours (depending on the network conditions) to replicate all over the web. After 24 or 48 hours your new server will start handling your users but within this period your old server will be handling users.

Problem/Solution


I face a small glitch after I transferred my site to new host is while writing a new post I was not able to upload media files. There is nothing to worry if you are facing the same issue.

You just need to change a simple setting within your wordpress control panel.

Within your WordPress control panel go to: Settings > Media. Here you need to change “Store uploads in this folder” to the new server. Normally it works like this. If your username is xyz on the server then they create a user with that name which has a home folder with the same name (xyz). So you need to change this line accordingly

/home/xyz/…… You need to change this xyz to your new username.

I have tried my level best to explain the about how to  move wordpress Blog to new host or server in simple steps.