How to Disable Block Editor WordPress without Plugin

The block editor, also known as Gutenberg, is the default content editor in WordPress. While it offers a modern editing experience, some users prefer the classic editor or have specific requirements that necessitate disabling the block editor.

In this step-by-step guide, we will provide you with detailed steps to disable the block editor in WordPress without any plugins. By following these instructions, you’ll gain full control over your editing experience and tailor it to your preferences.

Step 1: Access Your WordPress Files:

To disable the block editor, you need access to your WordPress installation files. You can accomplish this by using FTP or accessing the file manager within your hosting control panel.

Step 2: Locate the Active Theme’s functions.php File:

Within your WordPress files, navigate to the active theme’s directory and locate the “functions.php” file.

This file manages various functions and features of your theme.

Step 3: Open the functions.php File for Editing:

Using a text editor, open the “functions.php” file for editing.

Before proceeding, create a backup of the file to ensure you can revert to the original version if needed.

Step 4: Add Code to Disable the Block Editor:

To disable the block editor, insert the following code snippet at the end of the “functions.php” file:

add_filter( 'use_block_editor_for_post', '__return_false' );

This code snippet instructs WordPress to disable the block editor and revert to the classic editor for all posts and pages.

Step 5: Save and Upload the Modified functions.php File:

Save the changes made to the “functions.php” file and upload it back to your WordPress installation.

If prompted, overwrite the existing file.

Step 6: Verify the Block Editor is Disabled:

Log in to your WordPress dashboard and navigate to the post or page editor.

Confirm that the block editor is now disabled, and you can see the classic editor interface.

Step 7: Explore Alternative Editors (Optional):

If you wish to replace the block editor with an alternative, consider utilizing plugins or integrating custom code snippets.

Popular options include the TinyMCE Advanced plugin or integrating a customized editor tailored to your specific requirements.

Step 8: Thoroughly Test and Review:

After disabling the block editor, thoroughly test your website’s functionality to ensure all features and content display correctly in the classic editor or your chosen alternative.

Pay close attention to formatting, media handling, and any custom blocks or elements you’ve previously created.

Disclaimer: This tutorial is intended for educational purposes only. Keep in mind that disabling the block editor may affect your website’s functionality and compatibility with future WordPress updates. Proceed with caution and always maintain proper backups.


Source link