I just installed the jetpack plugin on my localhost version of WordPress 4.2.2 however after activating it—when I click on 'Connect to Wordpress.com', I get the following error:

enter image description here

Your website needs to be publicly accessible to use Jetpack: site_inaccessible Error Details: The Jetpack server was unable to communicate with your site http://wordpress.local [IXR -32300: transport error: http_request_failed Couldn't resolve host 'wordpress.local']

Is there any way to work around this running on localhost?


Add this to your wp-config.php:


This makes it possible to use features on localhost that don’t require a connection to wordpress.com. See the announcement post on jetpack.me for the background.

For your own plugins, learn that lesson: Do not rely on working outgoing connections. Respect your users privacy, and explain in clear words why such a connection is necessary, what data will be sent, and how to work with the plugin when the connection fails. In other words: Don’t do it the Jetpack way.

  • Thanks I tried this, I activated contact forms and I don't see any button on the new Page or new Posts? Am I missing something? – esteemed.squire May 27 '15 at 5:45
  • The button vanishes when you set the constant, but is there when you don’t? – fuxia May 27 '15 at 5:46
  • I don't see the button at all after activating the contact form. Using the default 2015 theme. – esteemed.squire May 27 '15 at 5:47
  • When I activate it on wp-admin/admin.php?page=jetpack_modules I get the button. – fuxia May 27 '15 at 6:01
  • 1
    +999999999 for Don't do it the Jetpack way. What an obnoxious plugin. – James Jones Dec 21 '16 at 13:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.