How can I disable Gutenberg on WordPress?

Question

Hi,

My blog has automatically updated to WordPress 5.0 and now it has weird layout and editor which is Gutenberg. I am very comfortable to use older style, but I couldn’t find a way to disable the new one. How can I disable Gutenberg on WordPress?

Thank you,

solved 0
Blogging Rachel 9 months 3 Answers 148 views Beginner Badge 1

About RachelBeginner Badge

Answers ( 3 )

  1. Hi Rachel,

    You can do this in two ways. It can be disable via altering code or using a plugin. If you don’t want to mess with codes, easiest way is to use a WordPress plugin, called “Disable Gutenberg“. It is very straight forward, simply install it and activate it, then you will see Gutenberg won’t be there.

    We hope it helps,
    Thank you,

    Best answer
  2. Thank you for the quick reply. I downloaded the free plugin and it works good.  Gutenberg is disabled now.

  3. – If you prefer to use a code to disable it –

    To disable Gutenberg

    As of now, the code required to disable Gutenberg completely looks like this**:

    add_filter('use_block_editor_for_post', '__return_false');

    This is for Gutenberg 4.1 or later and WordPress 5.0 beta.

    **Keep in mind please, Gutenberg is changing constantly.

    Older versions of WP/Gutenberg

    To completely disable Gutenberg on older versions, add the following line via functions.php or custom plugin (or even a must-use plugin!):

    add_filter('gutenberg_can_edit_post_type', '__return_false');

    This older disabling technique works with Gutenberg plugin version less than 4.1, along with WordPress versions less than 5.0 beta.

    Conditional technique

    In case it is useful for anyone, here is an example of how to conditionally disable Gutenberg/Block Editor depending on which version of WordPress is running.

    // Disable Gutenberg
    
    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');
    	
    }

    Here we use version_compare() to see if WordPress is running at 5.0 (beta) or better. If so, then we disable Gutenberg using the new filter. Otherwise, WordPress is running older version so we disable using the latest filter.

     

    {} Also other plugins are available (see attachment)

    Ref.


    Attachment

Leave an answer