Loading Gutenberg on VIP

VIP Go platform specific

This document is for sites running on VIP Go.

Learn more

On the WordPress VIP Go platform, Gutenberg editor is opt-in. If you do nothing, legacy editing experience will be preserved. If you wish to enable Gutenberg, load it in your theme code using the helper function wpcom_vip_load_gutenberg().

You can load Gutenberg everywhere, or selectively by post ID (load only for specific posts) and post type (load only for specific post types). It is agnostic about whether Gutenberg is loading from core or via the plugin, allowing for a seamless transition.

Loading Gutenberg

Loading behavior is controlled by the wpcom_vip_load_gutenberg() function, this needs to be added in your theme/functions.php. Calling this function without its single optional parameter causes Gutenberg to load on all post-edit screens.

An optional associative array of criteria can be passed. The possible keys and values are:

  • load (Int): 0|1: never or always load Gutenberg
  • posts (Array of post_ids): loads Gutenberg for the specified post_ids
  • post_types` (Array of post_types): loads Gutenberg for the specified post types.

Post Types
Make sure that the post type is registered with 'show_in_rest' => true otherwise Gutenberg can’t be enabled.


In theme/functions.php:

Load Gutenberg for all posts:

if ( function_exists( 'wpcom_vip_load_gutenberg' ) ) {
    wpcom_vip_load_gutenberg( true );

Do not load Gutenberg for any posts:

wpcom_vip_load_gutenberg( false );

Load Gutenberg for posts with ids 12, 13 and 122:

wpcom_vip_load_gutenberg( [ 'post_ids' => [ 12, 13, 122 ] ] );

Load Gutenberg for post_id 12 and all posts of type test and scratch:

wpcom_vip_load_gutenberg( [ 'post_types' => [ 'test', 'scratch' ], 'post_ids' => [ 12 ] ] );


The typical use case is as shown above, the parameters do not change except when theme code is updated.

If making more dynamic changes, note that the parameter supplied is persisted in a site option; when the parameters are changed in code, one page load is necessary to update the site option before the editor can use the new setting.

In rare cases you may prefer a different Gutenberg transition solution (eg Classic Editor). Thus, Ramp can be disabled:

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

Local Development

wpcom_vip_load_gutenberg() and the above functionality is available by default on your VIP Go Development Environment.

It is also separately available in the Gutenberg Ramp plugin, available here. If you are experimenting with this plugin in a non-Go development environment please be aware that the name of the function differs slightly on the VIP vs public version (although it accepts the same parameters). Also, the UI is intentionally switched off on the VIP version so that developers maintain control, rather than wp-admin users. Contributions are welcome, via the plugin repository.

Using Gutenberg Plugin, rather than Core

When running WordPress Core 5.0+, Gutenberg is loaded from core. However, you can choose to keep using the plugin if you’re interested in being on the forefront for Phase 2 development.

Phase 2 is about thinking outside the box, namely the post and page box, to allow Gutenberg to handle entire-site layouts. We will replace widgets with blocks, so any block will be able to be used in any registered “sidebar” for legacy themes, and we will upgrade “menus” to a navigation block.

In order to keep using the Gutenberg plugin instead of loading Gutenberg from Core, you need to be using at least Gutenberg plugin version 4.5.1. Then, add the following line of code to /vip-config/vip-config.php:

define( 'GUTENBERG_USE_PLUGIN', true );

While 4.5.1 is the minimum version needed to keep using the plugin, we strongly urge you to use at least 4.6.1, which introduces some parsing improvements.

Ready to get started?

Drop us a note.

No matter where you are in the planning process, we’re happy to help, and we’re actual humans here on the other side of the form. 👋 We’re here to discuss your challenges and plans, evaluate your existing resources or a potential partner, or even make some initial recommendations. And, of course, we’re here to help any time you’re in the market for some robust WordPress awesomeness.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.