Blog Post

How to disable block editor in WordPress 5.0

WordPress 5.0 brings a major update bringing the Block Editor. Not everyone is a fan of the new editor and not every type of content will benefit from using it. But, it is easy to disable it in favor of the old (or Classic) editor.

Block Editor (former Gutenberg plugin) has proven to be a very divisive feature that is now merged into the WordPress core and getting ready for version 5.0. For some types of websites, Block Editor is a great enhancement, but for many other purposes, Block Editor is unnecessary or even a big problem to use. If you depend on the features and plugins that integrate and work with (now) Classic Editor (TinyMCE), Block Editor will cause many issues.

Classic vs Block Editor
Classic vs Block Editor

So, how can you disable Block Editor in WordPress 5.0? There are a few methods.

Plugins to bring back Classic Editor

For most users, the easiest way to bring back Classic editor is with the plugin’s help. Right now, there are a few plugins available for this purpose, and I would like to recommend two plugins at this time:

Simple PHP code to disable Block Editor

If you prefer to add few lines of code (to the functions.php of the theme, or some other place), here is the example on how to disable Block Editor completely, for all post types:

add_filter('use_block_editor_for_post_type', 'd4p_32752_completly_disable_block_editor');
function d4p_32752_completly_disable_block_editor($use_block_editor) {
  return false;
}

Or, how to disable it for some post types only, and make sure to list post types to disable block editor in the array in line 3:

add_filter('use_block_editor_for_post_type', 'd4p_32752_disable_block_editor', 10, 2);
function d4p_32752_disable_block_editor($use_block_editor, $post_type) {
  if (in_array($post_type, array('post', 'my-custom-type', 'second-type'))) {
    return false;
  }

  return $use_block_editor;
}

With the simple MU plugin

The previous code example can be placed in the simple PHP only MU plugin and uploaded to the WordPress installation mu-plugins directory located in the wp-content directory – /wp-content/mu-plugins/.

You can download functional mu-plugins here. You should use only one of these. To install, download the ZIP file, and unpack the file inside into the wp-content/mu-plugins directory. If this directory doesn’t exist, create it.

  • Disable Block Editor for all post types – block-editor-disable-all.zip
    No modifications needed, just unpack into the mu-plugins directory.
  • Disable BLock Editor for some post typesblock-editor-disable-cpt.zip
    Unpack into the mu-plugins directory. As the previous code example, modify it to change post types to disable block editor for, on line 27 in the file.

As you can see, disabling Block Editor is easy, and you can do it selectively if needed, or completely. This way, you can continue to use the latest WordPress versions, and make your own choice on which editor you prefer to use.

Let me know which editor for WordPress do you prefer?

Please wait...

About the author

Milan Petrovic
Milan Petrovic

CEO and Lead developer of Dev4Press Web Development company, working with WordPress since 2008, first as a freelancer, later founding own development company. Author of more than 250 plugins and more than 20 themes.

Subscribe to Dev4Press Newsletter

Get the latest announcements, release digests, promotions and exclusive discounts, and general Dev4Press-related news straight into your mailbox.


This form collects your email (optionally your name) for the purpose of sending you newsletters. Check out our Privacy Policy for more information on how we store and manage your data. We will not send you any spam. Newsletters are sent 2 to 4 times every month.

17 thoughts on “How to disable block editor in WordPress 5.0”

  1. It woorked!

    Please wait...
    Reply
  2. I just hate this editor. I’m still thinking why such disgusting idea (of Gutenberg Block Editor) is integrated in wordpress? Simply boring & sickening.

    Please wait...
    Reply
  3. Thank you for posting, I was able to fix everything.

    Please wait...
    Reply
  4. YES, you are THE man !
    I used the filter code option (first one) and stored it in the functions.php of the theme.

    You saved my morning.

    Big thanks.

    Please wait...
    Reply
  5. Thank you so much. Block Code editor has been making it difficult for me to work with Visual composer. I installed Classic Editor and the whole thing started working. Thanks for your post.

    Please wait...
    Reply
  6. Thank you for posting. Installed and much happier. Thank you.

    Please wait...
    Reply
  7. Thank you so much!! My theme was wrecked and I had no idea how to use that new editor and no time to figure it out. Why change what wasn’t broken?? Thanks for helping me get what I needed to get done today!

    Please wait...
    Reply
  8. I want to disable it just for a page. It uses common template PHP file.

    Please wait...
    Reply
    • Hi, Disable Gutenberg plugin has options for selective disabling of Gutenberg. Or you can modify my example code to use conditional check for page ID instead of the post type.

      Please wait...
      Reply
  9. Thank you for this! I have used it on many sites so far, but have encountered an issue when a website is using the Types plugin. I was using the disable completely version of this function and when the site had Types installed, there were glitches with updating a post (regular, not custom post type), changing post date, updating Yoast settings. I have narrowed it down to being a conflict with Types, as I have used this on multiple sites and tested with each plugin. Any ideas on how to get around this?

    Please wait...
    Reply
    • Sorry, I have never used Types plugin. But, my code to disable Gutenberg is simple and straightforward, so most likely Types detects the version of WordPress to do somethings differently, regardless of Gutenberg being active or not.

      Please wait...
      Reply
  10. The option to disable the block editor should be part of the settings, not require these steps. The block editor is frustrating AF to work with, especially when one composes pages, posts, etc in a tool like Scrivener before creating the actual page or post.

    Please wait...
    Reply
    • Thanks for the comment! Yes, that would be best, and a lot of WordPress professionals asked that such options were included, but WordPress core developers decided against it, and that was it. One of the reasons against the option is to avoid confusing users.

      Please wait...
      Reply
      • > One of the reasons against the option is to avoid confusing users.

        Huh. Are we not users of WordPress? And aren’t us users asking for the option? Only thing confusing is how condescending that decision is!

        Please wait...
        Reply
  11. Thanks for this, it was very helpful. So far, I’m having a mixed response to the editor. I see a lot of potential in it, but it definitely adds headaches from time to time. Anything which gives us the ability to fine-tune client sites is valuable.

    Please wait...
    Reply
  12. Hi, I’m having a few issues-

    1) I was using the Classic Editor plugin so that I could keep using the Classic Editor. Unfortunately, recently Yoast started having conflicts with Classic Editor so all of my metadata info disappeared, and evrything in editor was a complete mess and got worse every day until I had to remove the Yoast plugin completely. After more and more research I realized that it was the Classic Editor that had had the conflict with Yoast. So, I deactiated the Classic Editor so I could reactivate Yoast (because without it my site started appearing as if it had hundreds of pages of duplicate content, lost all of it’s meta data descriptions, etc. because Yoast was providing all of this).

    NOW I’m being forced to use the block editor so I can keep yoast active but even with this I’m still having issues iwth the editor that I think are due to Yoast! It’s constantly ‘thinking’, it has delays and shuts down, can’t show previews, won’t let me enter key terms in SEO bar, etc. So now I have to figure out which plugin has an issue with the block editor (even though this isn’t even a plugin and I DO NOT UNDERSTAND). Do you have any suggestions for how to get my site back to being able to run yoast safely and successfully? What a nightmare. I just want my classic editor back. But I also need Yoast.

    Please wait...
    Reply
    • I personally don’t use Yoast plugin, I have my own SEO solution that is fine for my needs. But, in the past week or so, there have been so many complaints against the Yoast SEO plugin, that it is very likely that problems you have are caused by the Yoast SEO plugin. If you must use Yoast SEO plugin, you must wait for them to fix bugs.

      Please wait...
      Reply

Leave a Comment

WP Rocket - Make WordPress Load Fast in a Few Clicks
Grammarly - Number 1 Writing App
6