Howto use Wordpress Jetpack on localhost
This has bugged many users, coders and web addicts. As soon as Jetpack was out it has become an essential plugin for Wordpress. Instead of updating, maintaining and piling up all those "must have" plugins Jetpack has all the essentials with a niche and it comes straight from Automattic labs. The way we are going to make this work is making Jetpack believe that it has been connected to Wordpress. So, lets see what happens when you install Jetpack on localhost maybe something like below:
Its okay upto here but now comes the hard part. As soon as you click on Connect to Wordpress.com you might get error messages while connecting to Wordpress.com. Many discussed it over WP forums, Stackexchange and the conclusion was that Jetpack required a publicly accessible website in order to work, so there is nothing wrong with your Apache or PHP configuration.
If it can't work on a local test environment it beats the purpose of development. So, we try the other way around ie. making Jetpack believe its connected. To do this the first thing you do is install and enable Jetpack on a publicly accessible website (probably a site where you will deploy Jetpack after testing) maybe enable a few modules you require. Then just fire up your phpMyAdmin and open your WP database and search for something like this:
From here click GO button and you will get something like this:
Great, now Export these results and Import them back to your localhost database. Now go to WP-Admin -> Jetpack and see if you have it connected. If everything went right you might feel that "Aaaahaaa" moment like below:
Leave comments and suggestions below, but no SPAM please....