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.

SiteGround - Cloud Hosting: Fast, Scalable, Fully Managed

Comments

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.