How to Disable the WordPress Block Editor (Gutenberg)

Simon D Jan 6, 2025 WordPress Editor Management
How can I stop my website from using that new block editor and go back to the old way of writing posts?
What are the methods to disable the Gutenberg block editor in WordPress and revert to the classic editor for content creation?
Andy answered Jan 6, 2025

Different Ways to Disable the Block Editor

Method 1: Using a Plugin (Recommended for Most Users)

The simplest and safest way to disable Gutenberg is by installing the Classic Editor plugin.

Classic Editor Plugin

  • Official WordPress plugin
  • Over 5 million active installations
  • Maintained by WordPress contributors
  • Download Classic Editor

After installation:

  1. Go to Settings > Writing
  2. Choose your preferred editor settings
  3. Save changes

Method 2: Using Code (For Developers)

Add this code to your theme's functions.php or custom plugin:

Completely disable the block editor for all post types:

add_filter('use_block_editor_for_post', '__return_false');

Disable block editor for specific post types:

function disable_gutenberg_for_specific_posts($use_block_editor, $post_type) {
    // Add post types where you want to disable Gutenberg
    $disabled_post_types = array('post', 'page');
    
    if (in_array($post_type, $disabled_post_types)) {
        return false;
    }
    return $use_block_editor;
}
add_filter('use_block_editor_for_post_type', 'disable_gutenberg_for_specific_posts', 10, 2);

Method 3: Using wp-config.php

Add this line to wp-config.php before the "happy blogging" line:

define('CLASSIC_EDITOR_REPLACE', true);

Best Practices & Security Considerations

  1. Plugin Method (Recommended)

    • Easier to maintain
    • Automatically receives updates
    • Includes proper fallback mechanisms
    • User-friendly settings interface
  2. Code Method (Advanced)

    • Use in child theme's functions.php or custom plugin
    • Never modify core WordPress files
    • Test thoroughly after WordPress updates
    • Document your changes
  3. wp-config.php Method

    • Use only if you're comfortable editing server files
    • Back up your site before making changes
    • May need adjustment after major WordPress updates

Common Pitfalls to Avoid

  1. Don't modify core WordPress files
  2. Don't disable updates thinking it will keep Gutenberg away
  3. Don't use outdated code snippets from unreliable sources
  4. Don't forget to test your site after making changes

Additional Tips

  1. Test your site's functionality after disabling Gutenberg
  2. Check compatibility with your theme and plugins
  3. Keep the Classic Editor plugin updated
  4. Have a backup plan if you need to switch back

Alternative Solutions

  1. Disable Gutenberg Plugin

  2. Classic Editor Addon

Remember to regularly update your chosen solution to maintain compatibility with WordPress core updates.