How to Disable Gutenberg Editor (use Classic Editor)

To switch back to the Classic Editor by disabling the Block Editor (Gutenberg), you can use one of the following methods:

Method 1: Use the Classic Editor Plugin

The easiest way to switch back to the Classic Editor is to use the Classic Editor plugin.

  1. Go to your WordPress admin dashboard.
  2. Navigate to Plugins > Add New.
  3. Search for “Classic Editor”.
  4. Click Install Now and then Activate.

The Classic Editor plugin will automatically disable the Block Editor and revert your site to the classic editing experience.

Method 2: Add Code to functions.php

If you prefer not to use a plugin, you can add code to your theme’s functions.php file to disable the Block Editor.

  1. Open your theme’s functions.php file (located in wp-content/themes/your-theme/).
  2. Add the following code to disable the Block Editor:

// Disable Gutenberg editor for posts
add_filter('use_block_editor_for_post', '__return_false', 10);

// Disable Gutenberg editor for post types
add_filter('use_block_editor_for_post_type', '__return_false', 10);

Method 3: Create a Custom Plugin

If you prefer to create a custom plugin to disable the Block Editor, follow these steps:

  1. Create a new file in your wp-content/plugins/ directory, for example, disable-gutenberg.php.
  2. Add the following code to the file:

<?php
/*
Plugin Name: Disable Gutenberg
Description: Disables the Gutenberg Block Editor and reverts to the Classic Editor.
Version: 1.0
Author: Your Name
*/

// Disable Gutenberg editor for posts
add_filter('use_block_editor_for_post', '__return_false', 10);

// Disable Gutenberg editor for post types
add_filter('use_block_editor_for_post_type', '__return_false', 10);

3. Activate the plugin from the WordPress admin dashboard.

Optional: Hide the Gutenberg Nag

To hide the nag message that suggests switching to the Block Editor, you can add the following code to your functions.php file or custom plugin:


add_action('admin_init', function() {
    remove_action('try_gutenberg_panel', 'wp_try_gutenberg_panel');
});

By following any of these methods, you can disable the Block Editor (Gutenberg) and switch back to the Classic Editor in WordPress.

Leave a Reply

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

For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.