Skip to content

Control Jetpack content distribution

By default, Jetpack is enabled on all WordPress sites hosted on the VIP Platform. Jetpack adds a suite of powerful security, performance, and marketing features. Jetpack features that aid in content consumption, distribution, and syndication are collectively referred to as “content distribution tools“.

Jetpack’s content distribution tools provide:

Specific Jetpack content distribution features can be selectively enabled or disabled by using the jetpack_get_available_modules filter.

Default settings

The definition of the VIP_JETPACK_IS_PRIVATE constant determines whether Jetpack’s content distribution tools are enabled or disabled for an environment—or for a specific network site on a WordPress multisite.

Enabled

When VIP_JETPACK_IS_PRIVATE is defined as false Jetpack’s content distribution tools are enabled.

By default VIP_JETPACK_IS_PRIVATE is defined as false for:

  • Production environments for a WordPress application. For WordPress multisite, this includes all network sites on the production environment.
  • Sites that have Jetpack Search enabled, including non-production sites. By default, Jetpack’s content distribution tools are disabled for non-production sites, but enabling Jetpack Search for a site will override that default setting.

Disabled

When VIP_JETPACK_IS_PRIVATE is defined as true Jetpack’s content distribution tools are disabled.

By default VIP_JETPACK_IS_PRIVATE is defined as true for:

  • Non-production environments for a WordPress application. For WordPress multisite, this includes all network sites on a non-production environment.
  • Sites on an environment that have IP Allow List or Basic Authentication enabled. If VIP_JETPACK_IS_PRIVATE is overridden in custom application code and defined as false, IP Allow List or Basic Authentication will continue to restrict public traffic from accessing sites on the environment.

Enable content distribution

For environments that have Jetpack’s content distribution tools disabled by default (e.g. non-production environments) VIP_JETPACK_IS_PRIVATE can be redefined in application code to override the default setting.

Note

When Jetpack’s content distribution tools are enabled for a site or environment—even a non-production environment—content is:

  • Accessible via the WordPress.com REST API or Jetpack Search via unauthenticated requests.
  • Consumable via the WordPress.com Reader.
  • Syndicated via the WordPress.com Firehose.

Enable content distribution for all sites on an environment by defining VIP_JETPACK_IS_PRIVATE as false in vip-config.php:

/vip-config/vip-config.php
if ( ! defined( 'VIP_JETPACK_IS_PRIVATE' ) ) {
	define( 'VIP_JETPACK_IS_PRIVATE', false );
}

After the updated code is deployed, the default content distribution features that are included with Jetpack will be restored within 30 minutes.

For sites that require more customization for restricted access to their content, specific Jetpack content distribution features can be selectively enabled or disabled with the jetpack_get_available_modules filter.

Disable content distribution

For environments that have Jetpack’s content distribution tools enabled by default (e.g. production environments) VIP_JETPACK_IS_PRIVATE can be redefined in application code to override the default setting.

It may be desirable to disable Jetpack content distribution for sites that rely on restricting access via plugins or mechanisms that are not native to the VIP Platform (e.g. paywalls).

Note

When Jetpack’s content distribution tools are disabled:

  • Content is inaccessible via the WordPress.com REST API by unauthenticated requests.
  • Content in the Jetpack Search API is blocked and can no longer be accessed by a site. This will cause the site to fall back to Core WordPress database search. Jetpack Search can be configured for non-public content to be accessible via authenticated requests.
  • Content is blocked from consumption by the WordPress.com Reader.
  • Content is no longer syndicated via the WordPress.com Firehose.
  • Jetpack features (e.g. the Jetpack AI Assistant block) that require access to content will be blocked and will be unavailable or unable to operate as expected.

Disable content distribution for all sites on an environment by defining VIP_JETPACK_IS_PRIVATE as true in vip-config.php:

/vip-config/vip-config.php
if ( ! defined( 'VIP_JETPACK_IS_PRIVATE' ) ) {
	define( 'VIP_JETPACK_IS_PRIVATE', true );
}

After the updated code is deployed, the default content distribution features that are included with Jetpack will be disabled within 30 minutes.

For sites that require more customization for restricted access to their content, specific Jetpack content distribution features can be selectively enabled or disabled with the jetpack_get_available_modules filter.

Disable for a network site on a multisite

On a WordPress multisite environment, Jetpack’s content distribution can be code-disabled for one or more specific network sites.

In this code example, content distribution is disabled for a network site with the domain site.example.com:

/vip-config/vip-config.php
if ( 'site.example.com' === $_SERVER['HTTP_HOST'] ) {
    define( 'VIP_JETPACK_IS_PRIVATE', true );
}

This code example demonstrates disabling content distribution for a network site that has a site URL with a subdirectory structure:

/vip-config/vip-config.php
if ( 'example.com' === $_SERVER['HTTP_HOST'] &&
	0 === strpos( $_SERVER['REQUEST_URI'], '/subdirectory-example/' )
) {
    define( 'VIP_JETPACK_IS_PRIVATE', true );
}

Prevent Jetpack from automatically connecting

If Jetpack is enabled for a site, it will automatically connect to WordPress.com when the site launches. It might take a few minutes for a site’s connection to Jetpack to appear active after a site launch.

A process will run every hour after that to check that the connection is still active. If the connection is not active, the system will attempt to reconnect.

If an environment needs to be opted out of this behavior, define VIP_JETPACK_AUTO_MANAGE_CONNECTION as false in vip-config.php:

/vip-config/vip-config.php
define( 'VIP_JETPACK_AUTO_MANAGE_CONNECTION', false );

Prevent Jetpack from loading

To prevent Jetpack from loading in an environment define VIP_JETPACK_SKIP_LOAD as true in vip-config.php:

/vip-config/vip-config.php
define( 'VIP_JETPACK_SKIP_LOAD', true );

Caution

This is uncommon and will completely skip loading Jetpack. Be aware that the environment may lose required functionality and features (e.g. Jetpack Activity Log, Jetpack Social, Jetpack SSO). Do not add this constant unless it has been fully tested against the application on a non-production environment, and there is confidence that Jetpack features will not be used any time in the future.

Last updated: February 29, 2024

Relevant to

  • WordPress