WordPress & SEO Tips & Tricks

How to Disable the Gutenberg Editor in WordPress Without a Plugin in 2022

Maybe it’s because I’m getting old, but I can’t stand WordPress’ Gutenberg editor. That’s right, I said it. One of the great things about WordPress has always been how easy it was for non-tech-savvy users to create and edit new pages and post content, but replacing the classic WYSIWYG editor with Gutenberg blew that all to hell. I think it’s clunky and it isn’t at all newbie-friendly, so whenever I begin a new website build, one of the first things I do is disable Gutenberg and re-enable the WordPress classic editor.

Disabling the Gutenberg Editor Without a Plugin in functions.php

With the introduction of Google’s Core Web Vitals back in May of 2020, site speed has become an increasingly crucial ranking factor.  Seconds – even fractions of seconds – can make or break your search engine rankings. Because of this, I’m a big fan of using as few plugins as possible. Fewer plugins = fewer resources needed to render a page = faster load times. So here is how you can disable Gutenberg in WordPress without a plugin and with just a few lines of code.

NOTE: Be sure you back up your website and database before you make this – or any other – change to your file(s).

In the back end of your website, go to Appearances > Theme Editor. Make sure your theme (or child theme if you are using a third-party theme) is selected from the drop-down in the right-hand column and in the list of available files, click functions.php.

Disabling Gutenberg in WordPress w/o an Editor - Steps 1 and 2

Next, once your functions.php file has loaded in the editor window, scroll all the way to the end of the file and add the following code to disable the Gutenberg editor sitewide:

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

If you only want to disable Gutenberg for a specific post type, however, here is what you would use instead:

add_filter( 'use_block_editor_for_post_type', function( $enabled, $post_type ) {
return 'your_post_type_here' === $post_type ? false : $enabled;
}, 10, 2 );

Not only does this disable Gutenberg, but it re-enables WordPress’ classic editor by default!

Don’t breathe a sigh of relief just yet, my friends. Even though the Gutenberg editor is disabled, its CSS files are still being loaded by WordPress in the admin panel and on the front end. The final step in getting rid of Gutenberg is to disable – or dequeue – those files by adding the following code to your functions.php:

/* Dequeue Gutenberg Block Styles */
add_action( 'wp_enqueue_scripts', 'remove_block_css', 100 );
function remove_block_css() {
wp_dequeue_style( 'wp-block-library' ); // WordPress core
wp_dequeue_style( 'wp-block-library-theme' ); // WordPress core
wp_dequeue_style( 'wc-block-style' ); // WooCommerce
wp_dequeue_style( 'storefront-gutenberg-blocks' ); // Storefront theme

Once you’ve completed this step, your code should look something like this:

Disabling Gutenberg in WordPress w/o an Editor - Steps 3 and 4

Now the only thing left for you to do is click the Update File button to save your changes and you’re done!

Note: if your website is set up to disallow editing theme files in the back end, you may need to log into your web hosting control panel and access your theme’s functions.php file through File Manager.

Disabling the Gutenberg Editor with a Plugin

I know, I said I was going to show you how to disable Gutenberg without a plugin. But what if you didn’t use a child theme with your third-party theme or you aren’t comfortable making changes to your functions.php file? Sometimes a plugin can be the safest way to go. There are a number of available plugins to disable Gutenberg, but the most popular – and easiest to use – is the Disable Gutenberg plugin by Jeff Starr.

Disable Gutenberg Plugin

The plugin is used on over 600,000 websites and has been translated into 16 different languages. Installation and setup are super simple as well.

So there you have it – two ways to disable the Gutenberg editor in WordPress. Which one should you use? There’s no right or wrong answer. Use the method you’re most comfortable with. If you liked this tutorial and found it useful – or if there is something you think I’ve left out – feel free to email me or give me a shout-out on Twitter or LinkedIn!

Cynthia Turcotte is a freelance WordPress developer with over 20 years of web development and SEO experience. She lives in Deland, Florida with her husband and two grown sons and enjoys cooking, reading, old-school paper-and-dice roleplaying games (D&D and BESM FTW!), and debating the merits of food sharing with her dog.

This field is for validation purposes and should be left unchanged.