Skip to content

Version updates for Jetpack

By default, the current version of Jetpack plugin is automatically made available to all WordPress sites via VIP MU plugins.

The production and staging branches of VIP MU plugins are updated with the latest version of Jetpack on the Thursday subsequent to a Jetpack release. Details about the Jetpack release and advance notice for the scheduled version update on the VIP Platform are posted in the VIP Lobby.

An upcoming version of Jetpack will be made available on the staging branch of VIP MU plugins where it can be tested on non-production environments. The staging branch of VIP MU plugins can be configured to deploy to a non-production environment in the Software Versions panel of the VIP Dashboard.

As Jetpack code constitutes a significant proportion of a VIP Platform site, it is recommended that functionality particular to a site is tested against betas and release candidates of Jetpack as soon as they become available.

Automattic tests Jetpack releases against a diverse range of environments and sites to assess performance with various levels of data and traffic.

Limitations

Version support policy

VIP supports the current version of Jetpack, and for sites with a pinned version—only one major version behind.  

For example, if the current version of Jetpack is 13.2, the WordPress VIP Platform will support 13.2 as well as v.13.1.*. All versions of Jetpack previous to v.13.1. will be removed from VIP MU plugins. If a site has been pinned to a Jetpack version that does not exist in the VIP MU plugins directory, the default (current) version of Jetpack will be loaded instead.

Pinning to a version

Sites can be pinned to a specific version of Jetpack by defining the VIP_JETPACK_PINNED_VERSION constant with the desired version number of Jetpack in the application’s vip-config.php file.

vip-config/vip-config.php
define( 'VIP_JETPACK_PINNED_VERSION', 'X.Y');

Sites can only be pinned to major (X.Y) versions. To test version 14.0-beta, use 14.0 in the constant. When 14.0 is released, it will be updated automatically. Point releases containing security patches and/or bug fixes will automatically be applied to each version.

Add a separate test version of Jetpack to client-mu-plugins

A non-production site can load its own version of Jetpack by committing it to client-mu-plugins/jetpack in the repository branch that deploys to that environment. 

Caution

  • This method is intended for non-production environments only.
  • To avoid possible conflicts or fatals, complete Step 1 and Step 2 in separate commits. Repositories that run a build process, should allow the first build to complete before making the second commit.

Step 1: Add the test version of Jetpack to the repository

Beta versions of Jetpack can be downloaded from the Jetpack page on the WordPress.org plugins repository.

  1. Scroll to the bottom of the page.
  2. Under “PREVIOUS VERSIONS”, locate the desired beta version from the select box dropdown, and select “Download“. 

In a locally cloned and checked out version of the environment’s deploying branch:

  1. If a jetpack directory already exists in client-mu-plugins, delete it before adding the new downloaded version.
  2. Commit the version of Jetpack to be tested to the deploying branch of the environment’s GitHub repository.
  3. Add the Jetpack plugin directory within the client-mu-plugins directory. Updates do not need to be made to  /client-mu-plugins/plugin-loader.php file to reference the file.
  4. Commit the above changes.

Step 2: Load the test version of Jetpack on the environment

Define the WPCOM_VIP_JETPACK_LOCAL constant as true in vip-config.php to load the test version of Jetpack from the client-mu-plugins directory. Make this change in a separate commit to avoid conflicts/fatals.

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

The custom function in this code example prevents the test version of Jetpack from loading on a production site:

client-mu-plugins/example-file.php
$disallowed_jetpack_test_envs = array(
    'production',
);
if ( ! in_array( VIP_GO_APP_ENVIRONMENT, $disallowed_jetpack_test_envs, true ) ) {
    define( 'WPCOM_VIP_JETPACK_LOCAL', true );
}

Last updated: December 12, 2024

Relevant to

  • WordPress