Jetpack Running Locally [closed]

Wondered if anyone knew an easy way around this.

The code behind my local dev version of a WordPress instance and the live version are in sync (as they should be). Problem is this means the “Jetpack” plugin is working on the live version (since it’s a live blog that can connect to WordPress.com) but not on the local dev version.

This means functionality is available on the live version (like the “Subscribe” sidebar widget) but not on the local dev version, thus they’re out of sync.

8

As of JetPack 2.2.1 there is now a local development/debug mode.
http://jetpack.me/2013/03/28/jetpack-dev-mode-release/

use:

define ('JETPACK_DEV_DEBUG', true);

in your wp-config and you should have access to any modules that don’t require a connection to function.

Update, since around v3.3 another local development trigger was added via filter instead of define.

Latest is now here: http://jetpack.me/support/development-mode/

Development mode automatically gets enabled if you don’t have a period
in your site’s hostname, i.e. localhost. If you use a different URL,
such as mycooltestsite.local or something, then you will need to
define the JETPACK_DEV_DEBUG constant.

You can also enable Jetpack’s development mode through a plugin, thanks to the jetpack_development_mode filter:

add_filter( 'jetpack_development_mode', '__return_true' );

As of Jetpack v3.9 there is also now a staging mode filter that forces a site to be recongized as a staging site rather than production: https://developer.jetpack.com/hooks/jetpack_is_staging_site/

add_filter( 'jetpack_is_staging_site', '__return_true' );

Leave a Comment