Sunday, 10 May 2015

How to Moving WordPress Bluhost to Hostgator Server

Now, we need to make sure everything moves without any downtime. I also suggest planning out a day like a weekend, when you get the least traffic. This is to make sure; you will not lose any comments or guest post while migrating.
In this tutorial, we will be moving two things:
  • WP-content folder from the old host
  • Database of your WordPress site
Information and tool you need to keep handy:
  • New Hosting Info
  • Old Hosting Info
  • FileZilla or any other free FTP tool
On Dreamhost: Old hosting
Before we export wp-content and database, here we will be doing couple of things.
  • Delete all previous database backup
  • Delete all Cache files (Empty cache option in your cache plugin)
  • Delete all unused plugins & themes
  • Delete all Spam comments, Trash comments and trash posts.
We are doing so many cleanups to make sure your database and wp-content size could be as small as possible.
Install WP-Db Manager plugin and optimize database and after optimization, take a backup of WordPress database. If your database size is huge, use the gZip compression else take backup in .MySQL format.
Another thing which we need to take backup of is, WP-content folder. if you are usingcPanel hosting, you can simply login to file manager from cPanel and compress your wp-content folder and take backup, or use any FTP client and take backup of your wp-content folder.
On Hostgator: New Hosting
So far, at Dreamhost we have taken backup of WP-content and Database, and that is all we need to move ahead. Login to HostGator cPanel or new hosting account and Install WordPress on it. You can follow this guide to Install WordPress using Fantastico. Along with this, we will be creating a separate Database and a user and associating that user with Db with all the privileges.
Create a Database + User + Associate:
Login to your cPanel and click on Database >MySQL Database Wizard
Create Database
Here you will be giving a name to your database, creating a MySQL user & password and associating user with that database. Note down all the details in a notepad, as we will need it later to make changes in wp-config file.
WordPress Database user & pass
Database Privilage
So, here is the detail of newly created database and all associated details:
  • Db Name: unikaman_SML
  • Db user: unikaman_SML
  • Db password: _xzB-[Cbph.*
So, we are almost half way with our WordPress hosting migration, and now start the hard part. Since, our goal here is to move WordPress hosting with 0 down time, so we will first check everything is alright before migration. For this, we will edit our Windows hosts file, and point our domain to Hostgator server.
On Hostgator cPanel, left side bottom you can find the I.P address of your hosting account and edit your hosts file to point to that I.P. This guide will help you to edit your hosts fileand here is what my hosts file look like, replace the domain name with real domain that you are migrating.
0 downtime migration
What this will do is, it will let you see your site on new Web-host on your machine, whereas, everyone else in the world will see your site running on old hosting.
Now, open FTP and login to new hosting FTP. Upload all the content of Wp-content file (Backup from the old host) to your new hosting at the same location.public_html/domain.com/wp-content
And on your hosting cPanel, go to Database > PHPMyAdmin >Select the database from Left side > Import and upload the backed up database file from old hosting.
Import WordPress Database
If your database size is too huge and can’t be imported by default PHPMyAdmin importer, we will use a 3rd party tool call Bigdump. If you need tutorial for importing huge WordPress database, let me know, and I will write a separate tutorial for the same.
After importing is finished, click on Structure and note down the database prefix. Here is an example:
WordPress Db prefix
So, in this example migration, my WordPress DB prefix is : wp_7agot7_
Once it’s done, all you need to do is edit Wp-config file and add the database information that we created above: Open your wp-config file from root of your WordPress installation (Keep a backup of file before) and edit the details:
Editing wp-config file
Also, search for following line in Wp-Config.php file: $table_prefix  = 
And replace the prefix with, our Db prefix which we have found using Structure under your PHPMyAdmin. Example:
WordPress Database Prefix
Once you have done everything as mentioned in this tutorial, your site should be successfully migrated to new hosting. Now, all you need to do is verify all settings and make sure everything is working fine. Once you are sure about everything is working fine, go ahead and update Domain name servers to point to new hosting and in this case it’s Hostgator nameservers.

Possible problem & solution after WordPress host migration:

After moving WordPress Webhosting company, your directory structure is changed. So, few of your plugins might not be working, or you might be facing few issues. Here are some of the common problems which you might face, and here are the solution to those problems:
Weird Character problem:
AAt the time after migrating MySQL database, you will notice some weird character in your WordPress blog in the new host. For example, characters like:  Â and ’.
Image Upload problem:
After hosting migration, since your directory structure is changed you might get an error uploading new images. You need to go to Settings > Media under WordPress dashboard, and edit the location of Wp-content directory under “Store uploads in this folder” options.
Similarly, you need to make changes for WP-db manager or any other database backup plugin you are using to store database on your server. Also, take a note of .htaccess file, as most of the time you end up having a faulty or empty .htaccess file, which gives 404 error for all internal pages. You might like to refix your cache plugin, to update the .htaccess code.
More over, this tutorial looks technical but once you start moving WordPress blogs, you will realize it won’t take more than 30-45 minutes for a perfect migration. Though, time may differ based on size of database, wp-content folder and your skills.
Infact, many of you can consider starting a service based on the same and you can charge from 50-100$ for a hosting migration. Something, which I offer under my WordPress services, from long and it makes decent money with hour of work.
Quick recap:
  • Take back up of WP-content and Database on old server
  • Edit Hosts file on Local computer
  • Install WordPress on new Hosting server
  • Upload Wp-content folder
  • Create Database, user and password
  • Import Database
  • Update Wp-config file on new server
  • Verify everything
  • Update Nameserver to point to new hosting
  • Share this post :)

Monday, 4 May 2015

How to setup Custom Domain on Blogger with GoDaddy

How to setup Custom Domain on Blogger blog with GoDaddy

Step 1: Go to the Settings Tab of your blog in the Blogger UI and click on the "Add a custom domain" link.


Step 2: Enter the URL you would like to use for your blog and press Save. I'm using "www.thisdemoblog.com" but the URL doesn't need to start with www such as "blog.mridey.com" where I published this article.


Step 3: You will get an error. It's expected as you have not configured GoDaddy with the DNS settings required. Now click on the "DNS settings file" link and save the file. Keep this window open, you'll need it later.


Step 4: In a new window, go to GoDaddy, login, go to the Domain Control Panel and click on your domain name.


Step 5: Click on the "DNS Zone File" tab.


Step 6: Click on the Edit button.


Step 7: We need to delete some of the existing records that GoDaddy adds by default. Select all the "A" records with "@" as host as well as the CNAME record "www" (if the URL you want to use starts with www) and press the Delete button.


Step 8: Press the "Save Zone File" button.


Step 9: Press Ok to confirm.


Step 10: Press Ok to confirm again. :)


Step 11: Now let's load the new records. Click the Import/Export button and select "Import".



Step 12: Click "Select File" and find the file you have saved in step 3, then click the "I understand ..." checkbox and press the Ok button.


Step 13: Press Ok to confirm.


Step 14: You should be able to see your new records loaded in GoDaddy. Four "A" records as well as two CNAME records. All good.


Step 15: Go back to the Blogger settings window we kept open in Step 3 and click "Save" again.


Step 16: If like me the GoDaddy DNS server processed the changes really quickly, it should all work fine and the settings should be accepted. You should be back to the main settings with your new custom domain accepted as the blog Address. So click on "Edit".


If Step 16 fails, be patient and retry later. It can take up to 48h for DNS settings to propagate. 

Step 17: Enable the "Redirect ..." checkbox and press Save. This is to allow "naked domain" redirect i.e. when users type your domain name without the www at the beginning.


Step 18: Finally click the "View blog" button at the top of Blogger UI, it should all work fine and your blog should now be enabled with a custom domain.


Method : 2

Here I am going to show you “how to use custom domain on blogger with Godaddy.com”. We know that blogger provides us two kind of publishing options:
1. Simply Hosting on Blogspot (XYZ.blogspot.com).
2. Hosting on your custom domain(www.XYZ.com or www.example.XYZ.com ).
We can change our publishing option at any instant and our content will remain unchanged.
First of all, before we move our blog to a custom domain. We need to have already purchased a custom domain (www.XYZ.com) . as we can no longer buy custom domains from Blogger. Here is list through which you can buy domain:
  • GoDaddy.com
  • EasyDNS
  • Yahoo! Small Business
  • Namecheap.com
  • Hostmonster.com
Considering that we already have custom domain, Here is steps for “how to use custom domain on blogger or Blogspot ?”  follow the steps below:
1. Go to Blogger’s Home page.
2. Select Blogspot site, who’s domain you want customise.
3. Then Go to Setting -> Basic.
4. Now goto Publishing->Blog Address. Down there you will see +Set up a third-party URL for your blog or +Add custom domain. Type the URL of the domain you’ve purchased, Note that it must begin with www in order to work.
How to Use Custom Domain on Blogger with Godaddy5. Click Save.
6. After that you should see an error as shown below in image, and two CNAMEs listed below. You will see, each CNAME is made of two parts – Name, Label or Host and Destination, Target or Points to. First CNAME is the same for everybudy, Name being “www” and Destination “ghs.google.com.” But second CNAME is unique (particular to your blog and your Google Account,thats why different for Everyone)
37. Done with the blogger. Now go to control panel of your domain registrar’s website (Like Godaddy.com)and locate the DNS (Domain Name System) settings .

As I have mensioned Above you can purchase domain from Godaddy, EasyDNS, Yahoo! Small Business, Etc. Different domain providers has differnt settings for CNAME.
Godaddy.com:
1. Log in to your account at www.godaddy.com.
2. Open the Domains tab and select My Domain Names. You’ll be directed to the Domain Manager page.
3. Click the domain that you’d like to use with your blog and click on launch.
How to Use Custom Domain on Blogger4. Then Click to DNS Zone File Tab.
How to Use Custom Domain on Blogger with Godaddy5. Optional: You can also enter A-records, which links your naked domain (XYZ.com) to an actual site (www.XYZ.com). If you skip this step, visitors who leave off the “www” will see an error page.
6. After Completing step 5 enter your domain name in the format xyz.com, and (add recors) add the I.P. addresses Listed belove in the “A” section. For this you’ll need to create four individual A-records which will point to four different Google IPs.
How to Use Custom Domain on Blogger
Here is List of IP:
216.239.32.21
216.239.34.21
216.239.36.21
216.239.38.21
How to Use Custom Domain on Blogger with godaddy.com and free
How to Use Custom Domain on Bloggers A- Records in godaddy
8. After that, before you move to the final step, you need to wait about an 1 hour for your DNS settings to activate properly. If you try the final step before your settings are activated, Blogger will give you warning message.
9. Enter ghs.google.com as the Host Name. Specify a TTL or use the default setting of 1 hour. Mostly it is available by Default (www Record).
10. Click OK.
11. Click Add New CNAME Record again in the box labelled CNAMES (aliases). For this you need to copy CNAME from blogger Error masage which is Unique for every one. Add it in CNAME Records as shown in below second image.
How to Use Custom Domain on Blogger with Godaddy Hostgator
12. For the Name, enter the short security token.
13. Enter the long security token as the Host Name. Specify a TTL or use the default setting of 1 hour.
How to Use Custom Domain on Blogger with Godaddy A- Records14. Click OK, and then click OK again.
15. Finally go to blogger and save your custom name domain name. That’s it… Very Simple