Test features on a localhost WordPress installation, without a connection.
Note: This is specifically for offline, local development sites. If you have an online, staging site, please follow the Staging Sites guide instead.
Enabling Offline Mode in your local environment
You can enable some of the Jetpack features on your localhost by activating the Offline Mode. Here is how:
- Turn on Offline Mode by adding
define( 'JETPACK_DEV_DEBUG', true );
to yourwp-config.php
file. - Make sure you add it before the
/* That's all, stop editing! Happy blogging. */
line.
Offline mode may be automatically 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, then you will need to define the JETPACK_DEV_DEBUG
constant.
You can also enable Jetpack’s Offline Mode through a plugin, thanks to the jetpack_development_mode
filter:
add_filter( 'jetpack_offline_mode', '__return_true' );
Limitations of Jetpack on local installations
Please keep in mind:
- While in Offline Mode, some features will not be available at all, as they require WordPress.com for all functionality—Related Posts and Jetpack Social, for example.
- Paid features do not work in Offline Mode. You will not be able to activate a license on a localhost, even in the Offline Mode.
- Other features will have reduced functionality to give developers a good-faith representation of the feature. For example, Tiled Galleries requires the WordPress.com image CDN. In Offline Mode, Jetpack provides a fallback so developers can have a similar experience during development and testing.
Jetpack features that will not work in Offline Mode
In localhost installations, these are the features that will not work. If you need to test these features, please set up an online staging site instead:
- Activity Log
- AI Assistant
- Backup
- Google Analytics
- Instagram Widget
- JSON API
- Monitor
- Firewall
- Notifications
- Post by Email
- Jetpack Social
- Brute Force Attack Protection
- Scan
- Search
- SSO
- Subscriptions
- VideoPress
- WordAds
- WordPress.com Toolbar
- Donations
- Recurring payments
- Pay with PayPal
- VideoPress Block
- Mailchimp Block
Still need help?
Please contact support. We’re happy to advise.