As the 5.0 is getting real, and so is Gutenberg...

Is it possible to disable Gutenberg and use previous TinyMCE editor?

How to do this?

  • 1
    No need to make things bulky by custom code change. When you use Gutenberg, you also get a toggle feature(backward compatibility). On hover of each post, you would see the link “Classic editor” which lets you go back to classic editor. - Achin – Achin Kumar Dec 5 at 20:53
  • 2
    wordpress.org/plugins/classic-editor This plugin allows you to disable it entirely, or you have an option to use either the classic editor or the new editor on a per post basis. – Otto Dec 5 at 20:58
up vote 2 down vote accepted

Yes, you can disable it.

You can do this with code

If you want to disable it globally, you can use this code:

if ( version_compare($GLOBALS['wp_version'], '5.0-beta', '>') ) {
    // WP > 5 beta
    add_filter( 'use_block_editor_for_post_type', '__return_false', 100 );
} else {
    // WP < 5 beta
    add_filter( 'gutenberg_can_edit_post_type', '__return_false' );
}

And if you want to disable it only for given post type, you can use:

function my_disable_gutenberg_for_post_type( $is_enabled, $post_type ) {
    if ( 'page' == $post_type ) {  // disable for pages, change 'page' to you CPT slug
        return false;
    }

    return $is_enabled;
}
if ( version_compare($GLOBALS['wp_version'], '5.0-beta', '>') ) {
    // WP > 5 beta
    add_filter( 'use_block_editor_for_post_type', 'my_disable_gutenberg_for_post_type', 10, 2 );
} else {
    // WP < 5 beta
    add_filter( 'gutenberg_can_edit_post_type', 'my_disable_gutenberg_for_post_type', 10, 2 );
}

PS. If you don't want to support older versions, you can ignore filters beginning with 'gutenberg_', so no version checking is needed in such case.

Or using one of existing plugins

  1. Classic Editor
  2. Disable Gutenberg
  3. Guten Free Options
  4. Gutenberg Ramp
  • 1
    Should be an option in the settings when WordPress 5 is launched. To choose between classic and block (Gutenberg) editor. – André Kelling Dec 5 at 14:29
  • @AndréKelling totally agree – Krzysiek Dróżdż Dec 5 at 15:03

Generally the answer is no. Gutenberg stores content in a different format than how the pre 5.0 editor did. YMMV significantly if you try to disable gutenberg after content was already created, things might work for core blocks, but blocks created by plugins, who knows.

Now if the question is about disabling before having any content edited in gutenberg, then you have a better chance with the other answers, but this is going to be a short term bandaid fix and is not a long term proper strategy. In the long term all those options are not going to be tested against or just bit rot. And on top of that you might have a limited selection of themes and plugins you can work with.

5.0 have already hard coded gutenberging of sample content. you are not going to escape the need to use it by hacks.

If you want to use WordPress you should embrace its core features, and you do not want to build technical debt and be forced to migrate to gutenberg on a rush. It is better to just do it once it stabilizes and get done with it.

If you do not want to embrace WordPress core features, why do you use it?

  • 1
    It’s not exactly true with the different format. Content is still stored in post_content, and is saved as HTML. Of course you won’t be able to edit that content the same way (unless you used dynamic blocks), but it will be possible. Gutenberg stores it’s metadata as comments, so it won’t break anything. – Krzysiek Dróżdż Dec 6 at 6:06
  • of course it is different, in "old" html comments are not significant and with "new" they are, and this is just the most obvious difference.Next in line would be that "old" uses new line as paragraph boundary while "new" directly inserts <p> elements. The fact both formats use the same DB field is the least significaant – Mark Kaplun Dec 6 at 6:38
  • 1
    In new they are also not significant for rendering posts (unless you use dynamic blocks). Static blocks will display correctly and you’ll be able to edit them as HTML. It’s not a different format - it just adds more meta comments. It’s also not true that comments are insignificant in old editor (you already use some meta comments as more or nextpage) ;) – Krzysiek Dróżdż Dec 6 at 6:43
  • you should try it instead of speculating. try editing something with gutenberg, add an ACF block to the content. Now switch to classic editor and tell me what you see and if you can actually edit it (ok, I am guessing here about how ACF blocks works). Formats are not compatible, this is DB design 101, once the parsing is different you are not compatible any more. – Mark Kaplun Dec 6 at 6:49
  • 1
    Mark, I’m testing Gutenberg for over 6 months now ;) We’ve also organized a meetup with one of Gutenberg’s devs here in Wroclaw (in May, or even earlier). Please - read carefully - I clearly stated “unless you use dynamic blocks... – Krzysiek Dróżdż Dec 6 at 6:53

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.