search ]

Few ways to disable Gutenberg on WordPress

Since WordPress 5.0, the Gutenberg block editor has been the default content editor. While it offers powerful block-based editing, many developers and site owners prefer the classic editing experience for existing projects, client sites, or workflow compatibility.

All the methods described in this guide apply to WordPress 5.0 and above. If you’re running an older version, Gutenberg is not included by default.

This post covers several ways to disable the Gutenberg block editor and restore the classic editor – using plugins as well as code-level solutions.

Will Gutenberg Break My Site?

In general, upgrading to WordPress 5.0+ should not cause serious issues. The block editor is backward-compatible with content created using the classic editor.

However, if your site relies on Custom Meta Boxes, the editing experience for pages and posts may be disrupted. Some plugins that use Custom Meta Boxes may also encounter issues if their developers have not updated them for the block editor.

It is highly recommended to perform tests in a local or development environment before updating your live site. Even for a quick check on the live site, make sure to perform a full backup of your WordPress site first.

Your Options as WordPress Site Owners

If you need to decide how to handle the block editor, you have two options:

  • Invest the time to update your sites, themes, and plugins to work with Gutenberg.
  • Disable Gutenberg or postpone the transition until you are ready.

For those who are not ready to convert page content to the block editor, or who do not have the time or budget for the transition, the following methods provide practical solutions.

How to Disable Gutenberg Using a Plugin

There are two main plugins you can use to disable Gutenberg in WordPress 5.0+:

1. Using the Classic Editor Plugin

The Classic Editor plugin restores the WordPress editor and editing screen to what it was before WordPress 5.0. By default, the plugin removes all traces of the block editor introduced by Gutenberg.

After installing the plugin, you can set which editor to use through Settings > Writing in the WordPress admin panel:

Classic Editor plugin settings in the WordPress Writing Settings page showing editor selection options

2. Using the Disable Gutenberg Plugin

Another simple way to remove the block editor is by using a free plugin called Disable Gutenberg. This plugin focuses on one thing – disabling Gutenberg and restoring the classic WordPress editor.

Simply activate the plugin, choose the relevant options, and you’re done. The options include:

  • Completely disabling Gutenberg (for all content types).
  • Disabling Gutenberg for specific content types (Specific CPTs).
  • Disabling Gutenberg based on user roles.
  • Disabling Gutenberg based on page/post ID.
  • Disabling Gutenberg based on page template.

In addition, this plugin allows you to hide the Gutenberg menu in the WordPress admin interface and remove the prompt to try the block editor.

Take a look at the plugin documentation for more details.

The screenshot below shows the Disable Gutenberg plugin settings page, where you can control exactly which post types, user roles, and specific posts should use the classic editor:

Disable Gutenberg plugin settings page showing options to disable the block editor by post type, user role, and post ID

How to Disable Gutenberg Using Code

You can also disable Gutenberg using code. There are several approaches for various situations:

1. Full Disabling of Gutenberg

To completely disable Gutenberg, add the following code to your functions.php file, your custom plugin, or an MU-Plugin:

add_filter('use_block_editor_for_post', '__return_false', 10);
add_filter('use_block_editor_for_post_type', '__return_false', 10);

This is the recommended way to disable Gutenberg entirely. The first filter disables it for individual posts, and the second disables it for all post types.

2. Disabling Gutenberg for Specific Content Types

Gutenberg is active by default for posts and pages. If it is also active for custom post types, you can disable it selectively using the use_block_editor_for_post_type filter:

function sv_disable_gutenberg($is_enabled, $post_type) {
    if ($post_type === 'movie') return false;
    return $is_enabled;
}
add_filter('use_block_editor_for_post_type', 'sv_disable_gutenberg', 10, 2);

In this case, the Gutenberg editor is disabled for a custom post type called movie. This code snippet affects only the specified content type. To disable Gutenberg for other post types, replace 'movie' with the relevant post type slug.

Disabling Gutenberg During Custom Post Type Registration

You can also disable Gutenberg during the creation of custom post types. This approach is relevant only for custom post types that don’t use any content editor at all (neither Gutenberg nor the classic editor), because it completely hides the content editor.

To do this, remove editor from the supports parameter when registering your custom post type:

$args = array(
    'label'    => __('Movies'),
    'labels'   => $labels,
    'supports' => array(
        'author',
        'custom-fields',
        'title',
        'thumbnail'
    ),
    'has_archive'  => false,
    'hierarchical' => false
);
register_post_type('movie', $args);

By not including the editor parameter, the custom post type called movie will not contain anything related to Gutenberg and, in fact, won’t have any content editor at all.

Disabling Gutenberg During Custom Post Type Registration (Using REST API)

Another way to disable Gutenberg during custom post type registration is to disable the REST API for that post type. Set show_in_rest to false:

$args = array(
    'label'        => __('Movies'),
    'labels'       => $labels,
    'show_in_rest' => false,
    'supports'     => array(
        'author',
        'custom-fields',
        'editor',
        'title',
        'thumbnail'
    ),
    'has_archive'  => false,
    'hierarchical' => false
);
register_post_type('movie', $args);

Even though the custom post type supports the editor, Gutenberg is disabled because it requires the REST API to function. Without show_in_rest set to true, WordPress falls back to the classic editor.

Keep in mind that disabling REST API for a post type also prevents it from being accessible via the WordPress REST API for other purposes, such as headless WordPress setups or external integrations.

3. Disabling Gutenberg for Meta Boxes

Many plugins use Meta Boxes. If you are writing a plugin and want to ensure these Meta Boxes behave as they do with the classic editor, you can pass the __back_compat_meta_box argument to the add_meta_box function:

add_meta_box(
    'metabox_id',
    'Metabox Title',
    'metabox_callback',
    null,
    'advanced',
    'default',
    array('__back_compat_meta_box' => true)
);

Pay attention to the seventh parameter, $callback_args. More information on adding Meta Boxes in the WordPress Developer Reference.

FAQs

Common questions about disabling Gutenberg in WordPress:

Will WordPress stop supporting the classic editor?
The Classic Editor plugin is officially maintained by the WordPress team and has been extended multiple times. While there is no permanent guarantee, it continues to be supported and is widely used on millions of sites.
Can I use both the classic editor and Gutenberg on the same site?
Yes. Both the Classic Editor plugin and the Disable Gutenberg plugin allow you to enable the classic editor for specific post types while keeping Gutenberg active for others. You can also allow users to choose their preferred editor per post.
Does disabling Gutenberg affect my existing content?
No. Disabling the block editor does not delete or modify existing content. Posts created with Gutenberg blocks will still display correctly on the frontend. However, editing block-based content in the classic editor may show raw block markup.
What is the difference between use_block_editor_for_post and use_block_editor_for_post_type?
The use_block_editor_for_post filter runs per individual post and gives you access to the post object, allowing conditional logic based on post ID, meta, or other criteria. The use_block_editor_for_post_type filter runs per post type and is simpler when you want to disable Gutenberg for an entire post type.
Should I disable Gutenberg for a new WordPress project?
For new projects, it is generally recommended to use the block editor since it is the standard and receives ongoing improvements. Disabling Gutenberg is most useful for legacy sites, projects with heavy custom meta box usage, or when clients specifically prefer the classic editor.

Summary

This post covered several ways to disable Gutenberg in WordPress – from simple plugin installations to code-level solutions for specific post types and meta boxes. The block editor continues to evolve, so make sure to test any of these methods with your current WordPress version before applying them to a live site.

Join the Discussion
0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!

Savvy WordPress Development official logo