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 favour of 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 a lot of 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 a lot of 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 help of the plugin. 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 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

MillaN
MillaN
Dev4Press owner and lead developer

Programmer since the age of 12 and now WordPress developer with more than 8 years of WordPress experience, author of more than 100 plugins and more than 20 themes.

elegantthemes

11 Comments

  1. yolanda says:

    It woorked!

    Please wait...
  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...
  3. Thank you for posting, I was able to fix everything.

    Please wait...
  4. joost says:

    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...
  5. Joseph says:

    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...
  6. Alison says:

    Thank you for posting. Installed and much happier. Thank you.

    Please wait...
  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...
  8. Appa says:

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

    Please wait...
    1. MillaN says:

      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...
  9. AnnMarie says:

    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...
    1. MillaN says:

      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...

Leave a Reply

Your email address will not be published. Required fields are marked *

Newsletter

Subscribe to get all the latest news and promotions.

Subscribe We will not send you any spam. Newsletters are sent 2 to 4 times every month.