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:
- Programmatic access to content via the WordPress.com REST API and Jetpack Search
- Subscriptions via the WordPress.com Reader
Jetpack’s content distribution tools can be selectively enabled or disabled by defining the VIP_JETPACK_IS_PRIVATE
constant as false
or true
for an environment—or for a limited set of network sites on a WordPress multisite.
For sites that require more customization for access to their content, individual Jetpack content distribution features can be enabled or disabled via code with the jetpack_get_available_modules
filter.
Additional Jetpack modules—such as Enhanced Distribution—can also be enabled in the WordPress Admin dashboard.
Enable content distribution
When VIP_JETPACK_IS_PRIVATE
is defined as false
Jetpack’s content distribution tools are enabled.
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.
By default VIP_JETPACK_IS_PRIVATE
is defined as false
for:
- Jetpack site connections on production environments. For WordPress multisite, this includes Jetpack connections for network sites on a 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.
Code-enable content distribution
For environments that have Jetpack’s content distribution tools disabled by default, content distribution can be enabled by defining VIP_JETPACK_IS_PRIVATE
as false
to override the default setting.
Enable content distribution for all sites on an environment by defining VIP_JETPACK_IS_PRIVATE
as false
in 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
When VIP_JETPACK_IS_PRIVATE
is defined as true
Jetpack’s content distribution tools are disabled.
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.
- 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.
By default VIP_JETPACK_IS_PRIVATE
is defined as true
for:
- Jetpack site connections on non-production environments. For WordPress multisite, this includes Jetpack connections for all network sites.
- Sites on an environment that have IP Allow List or Basic Authentication enabled. Even if
VIP_JETPACK_IS_PRIVATE
is overridden in custom application code and defined asfalse
, IP Allow List or Basic Authentication will continue to restrict public traffic from accessing sites on the environment.
Code-disable content distribution
For environments that have Jetpack’s content distribution tools enabled by default, content distribution can be disabled by defining VIP_JETPACK_IS_PRIVATE
as true
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).
Disable content distribution for all sites on an environment by defining VIP_JETPACK_IS_PRIVATE
as false
in 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 content distribution 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
:
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:
if ( 'example.com' === $_SERVER['HTTP_HOST'] &&
0 === strpos( $_SERVER['REQUEST_URI'], '/subdirectory-example/' )
) {
define( 'VIP_JETPACK_IS_PRIVATE', true );
}
Last updated: September 09, 2024