423

How to Disable Gutenberg and Enable the Classic Editor in WordPress

Powered by WPCodeBox

This WordPress snippet efficiently disables Gutenberg, allowing you to use the Classic Editor without installing additional plugins.


<?php 

// Disable Gutenberg for posts
add_filter('use_block_editor_for_post', '__return_false', 10);

// Disable Gutenberg for pages and other post types
add_filter('use_block_editor_for_post_type', '__return_false', 10);

Quick Steps to Disable Gutenberg Editor

Follow these simple steps to disable Gutenberg and use Classic Editor:

  1. Install and activate the WPCodeBox plugin, then navigate to WPCodeBox 2 in your WordPress dashboard.
  2. Copy the code snippet above and paste it into the WPCodeBox code editor.
  3. Give your snippet a descriptive title (like “Disable Gutenberg”), select PHP as the type, then click Save.
  4. Enable the snippet by toggling the switch to the active position.
  5. Test the changes by creating a new post or page to verify Classic Editor is active.

That’s it! Gutenberg is now disabled, and Classic Editor is enabled on your WordPress site.

Disable Gutenberg Editor – Additional Information

Gutenberg Editor vs Classic Editor

WordPress offers two different editing experiences: the modern Gutenberg block editor and the traditional Classic Editor. Gutenberg provides a visual, block-based interface with drag-and-drop functionality. Each piece of content exists as an individual block that can be rearranged freely.

The Classic Editor, on the other hand, offers a simple, text-based interface that’s immediately familiar to longtime WordPress users. It’s lightweight and requires no learning curve.

Why You Might Want to Disable Gutenberg

There are several good reasons you might prefer to disable Gutenberg and stick with Classic Editor:

  • Learning curve: Gutenberg presents a steeper learning curve that can overwhelm users familiar with traditional word processors. If you or your team are comfortable with the Classic Editor workflow, switching might not be worth the effort.
  • Plugin compatibility: Some older plugins and themes lack compatibility with the block-based system. If you rely heavily on plugins that haven’t been updated for Gutenberg, sticking with Classic Editor ensures everything continues working smoothly.
  • Simple content needs: If you run a straightforward blog or website with routine content needs, Classic Editor delivers exactly what’s required without unnecessary complexity.

Benefits of Using Code to Disable Gutenberg

Using a code snippet to disable Gutenberg offers several advantages over installing a plugin. It’s a lightweight approach that adds minimal overhead to your site, and you get the same result without the security risks and update maintenance that come with additional plugins.

Code snippets are also less likely to break with WordPress updates compared to dedicated plugins that might not be maintained as actively. Plus, this approach prevents Gutenberg from loading unnecessary CSS and JavaScript files on your site’s front end, which can improve page load times.

We also have a video in which we use this snippet:

Other Snippets

WPCodeBox is a WordPress Code Snippets Manager that allows you to share your WordPress Code Snippets across your sites.