How to Disable Gutenberg and Keep the Classic Editor in WordPress

Understanding Gutenberg and the Classic Editor
Gutenberg, officially known as the Block Editor, was introduced in WordPress 5.0 as a replacement for the Classic Editor. It’s a block-based editor where content is created using individual blocks for paragraphs, headings, images, and more. This approach aimed to provide a more visual and intuitive writing experience, closer to what you see on the front-end of your website.
The Classic Editor, on the other hand, is a WYSIWYG (What You See Is What You Get) editor that resembles a traditional word processor. It allows users to format text, insert media, and manage content in a single, unified editing area using a toolbar similar to Microsoft Word. Many users prefer the Classic Editor due to its familiarity and the control it offers over HTML and formatting.
Reasons for Disabling Gutenberg
Many WordPress users prefer to disable Gutenberg and retain the Classic Editor for various reasons:
- Familiarity: Users comfortable with the Classic Editor may find Gutenberg’s block-based approach unfamiliar and less efficient.
- Compatibility Issues: Some older themes and plugins may not be fully compatible with Gutenberg, leading to layout problems or functionality errors.
- Complexity: Some users find Gutenberg’s interface more complex and less intuitive than the Classic Editor, especially for simple content creation tasks.
- Control Over Code: The Classic Editor allows for more direct control over HTML and CSS, which is important for users who need to fine-tune their content’s appearance.
- Performance: In some cases, Gutenberg can be slower than the Classic Editor, especially on websites with a large number of posts and pages.
Methods for Disabling Gutenberg and Keeping the Classic Editor
Several methods can be used to disable Gutenberg and keep the Classic Editor in WordPress. These methods range from installing a plugin to manually adding code snippets to your theme’s functions.php file.
Using the Classic Editor Plugin
The most straightforward and recommended method is to install and activate the official “Classic Editor” plugin. This plugin is developed and maintained by the WordPress team and is designed to seamlessly restore the Classic Editor functionality.
- Go to your WordPress dashboard.
- Navigate to “Plugins” -> “Add New”.
- Search for “Classic Editor”.
- Find the “Classic Editor” plugin by WordPress Contributors.
- Click “Install Now”.
- Once installed, click “Activate”.
After activating the Classic Editor plugin, you’ll have several configuration options:
- Default editor for all users: You can choose whether the Classic Editor or Gutenberg is the default editor for all users on your site.
- Allow users to switch editors: You can enable or disable the option for users to switch between the Classic Editor and Gutenberg. If enabled, users will see a “Switch to Classic Editor” or “Switch to Block Editor” link on the edit screen.
These settings can be found under “Settings” -> “Writing”. Configure them according to your preferences.
Using the Disable Gutenberg Plugin
Another plugin option is the “Disable Gutenberg” plugin. This plugin provides more granular control over where Gutenberg is disabled.
- Go to your WordPress dashboard.
- Navigate to “Plugins” -> “Add New”.
- Search for “Disable Gutenberg”.
- Find the “Disable Gutenberg” plugin by Disable Gutenberg Team.
- Click “Install Now”.
- Once installed, click “Activate”.
After activating the plugin, go to “Settings” -> “Disable Gutenberg”. This plugin offers several options:
- Complete Disable: Disables Gutenberg everywhere.
- Disable for Posts: Disables Gutenberg only for posts.
- Disable for Pages: Disables Gutenberg only for pages.
- Disable for Post Types: Allows you to select specific post types where Gutenberg should be disabled.
- Disable for Roles: Allows you to disable Gutenberg for specific user roles.
This plugin is useful if you only want to disable Gutenberg for certain post types or user roles.
Using Code Snippets in functions.php (Not Recommended for Beginners)
While not recommended for beginners due to the risk of breaking your website, you can disable Gutenberg using code snippets added to your theme’s functions.php file or a code snippets plugin.
**Important:** Before editing your functions.php file, create a backup of your website. Incorrect code can cause errors and make your site inaccessible. Consider using a code snippets plugin instead, as it provides a safer and easier way to manage code changes.
**Method 1: Disabling Gutenberg Completely**
Add the following code to your functions.php file or code snippets plugin:
“`php
add_filter(‘use_block_editor_for_post’, ‘__return_false’, 10);
add_filter(‘use_block_editor_for_post_type’, ‘__return_false’, 10);
“`
This code disables Gutenberg for all posts and post types.
**Method 2: Redirecting Gutenberg to the Classic Editor**
Add the following code to your functions.php file or code snippets plugin:
“`php
add_filter(‘replace_editor’, function ($replace) {
return true;
});
“`
This code redirects all attempts to use Gutenberg to the Classic Editor.
**Method 3: Hiding the “Try Gutenberg” Notice**
If you’re using an older version of WordPress and see a “Try Gutenberg” notice, you can hide it with the following code:
“`php
add_action(‘admin_init’, function() {
remove_action( ‘admin_notices’, [ ‘Gutenberg_Editor’, ‘maybe_show_feature_pointers’ ] );
remove_action( ‘admin_notices’, [ ‘Gutenberg_Editor’, ‘maybe_show_ Gutenberg_update_box’ ] );
});
“`
**Caution:** Editing the functions.php file directly can be risky. If you encounter errors, you may need to access your website files via FTP or your hosting control panel to remove the problematic code.
Using a Code Snippets Plugin (Recommended for Code-Based Solutions)
Code snippets plugins provide a safer and more organized way to add custom code to your WordPress site without directly editing your theme’s files. This approach minimizes the risk of breaking your website.
Here’s how to use a code snippets plugin:
- Go to your WordPress dashboard.
- Navigate to “Plugins” -> “Add New”.
- Search for “Code Snippets”.
- Find a reputable “Code Snippets” plugin (e.g., “Code Snippets” by Code Snippets Pro).
- Click “Install Now”.
- Once installed, click “Activate”.
After activating the plugin, you can add the code snippets mentioned earlier through the plugin’s interface.
- Go to “Snippets” -> “Add New”.
- Give your snippet a descriptive title (e.g., “Disable Gutenberg”).
- Paste the code snippet into the code editor.
- Choose where to run the snippet (usually “Everywhere”).
- Click “Save Changes and Activate”.
Using a code snippets plugin makes it easier to manage and disable code snippets if needed, without directly modifying your theme files.
Considerations When Disabling Gutenberg
While disabling Gutenberg can be beneficial in some situations, consider the following points:
- Future Compatibility: WordPress is continuously evolving, and future updates may increasingly rely on Gutenberg’s block-based architecture. Disabling Gutenberg might eventually limit your ability to use new features or themes.
- Plugin and Theme Updates: Ensure that your chosen method for disabling Gutenberg remains compatible with future WordPress updates, as well as updates to your themes and plugins.
- User Experience: If you have multiple users on your WordPress site, consider their preferences when deciding whether to disable Gutenberg. Providing the option to switch editors can accommodate different user needs.
- Learning Curve: While the Classic Editor is familiar, Gutenberg offers new possibilities for content creation and design. Consider investing time in learning Gutenberg to leverage its potential benefits.
Troubleshooting Common Issues
If you encounter issues after disabling Gutenberg, try the following troubleshooting steps:
- Clear Your Browser Cache: Sometimes, cached files can interfere with the editor’s functionality. Clear your browser cache and try again.
- Deactivate Other Plugins: Conflicts with other plugins can cause problems. Deactivate other plugins one by one to identify the source of the conflict.
- Check Your Theme: Ensure your theme is compatible with the chosen method for disabling Gutenberg. Try switching to a default WordPress theme to see if the issue persists.
- Review Your Code: If you’re using code snippets, double-check the code for errors and ensure it’s placed in the correct location.
- Consult the WordPress Support Forums: The WordPress support forums are a valuable resource for troubleshooting issues and finding solutions to common problems.
Alternatives to Disabling Gutenberg Completely
If you’re hesitant to disable Gutenberg entirely, consider these alternatives:
- Learn to Use Gutenberg: Invest time in learning Gutenberg and its features. Many tutorials and resources are available online to help you master the Block Editor.
- Use a Hybrid Approach: Keep Gutenberg enabled but use the “Classic Block” within Gutenberg. This block allows you to use the Classic Editor within the Gutenberg environment.
- Consider a Page Builder Plugin: Page builder plugins like Elementor, Beaver Builder, and Divi provide more advanced design capabilities than both Gutenberg and the Classic Editor. They offer a visual drag-and-drop interface for creating complex layouts.
Conclusion
Disabling Gutenberg and keeping the Classic Editor is a common practice for users who prefer the traditional writing experience or encounter compatibility issues. While the Classic Editor plugin offers the simplest and most reliable solution, other methods, such as the Disable Gutenberg plugin and code snippets, provide more granular control. However, it’s crucial to consider the potential long-term implications of disabling Gutenberg and explore alternatives before making a final decision. Remember to back up your website before making any significant changes and troubleshoot any issues that may arise.