Enable Old Classic Editor in WordPress 5.0 Using a Single Line PHP Code [Off Topic]

Most of the WordPress users dislike the new Gutenberg editor and want to enable classic WordPress editor. Though the ongoing Gutenberg is modern, yet most of the bloggers would love to stick to WordPress Classic editor. Classic editor has it’s own simple style and easiest usability that’s why almost all WordPress users including me love to enable old classic WordPress editor.

While searching for how to disable the Gutenberg WordPress editor and or enable the old basic WordPress editor, I have found nothing except the installation of “Classic WordPress Editor” plugin. Some experts advised to use “Disable Gutenberg” plugin. I know both of the methods work well with the current version of WordPress 5.0, and both of them give you the option of using the classic editor and Gutenberg editor alternatively from WordPress settings menu. Even you can set up the desired WordPress editor according to various user roles.

I, personally hate too many WordPress plugin installation. It not only increases the page loading time, but also affects the SEO of your site which is very harmful for the search ranking position of your website or blog. That’s why I prefer to modify WordPress code so that I can avoid plugin installation up to a certain level.

Now, in this off-topic article, I am going to tell you my method or a simple WordPress hack to disable WordPress Gutenberg dashboard, thus I enable the Classic WordPress Editor for my blog just by adding a single line PHP code in the theme’s function file.

Enable Classic Editor in WordPress 5.0

How to Enable Classic Editor in WordPress 5

Hopefully, you are using WordPress and love to get back the old UI of post editor in WordPress. To disable the new WordPress editor (Gutenberg), just follow the steps mentioned below:

  • Log in to your WordPress Dashboard with admin privilege.
  • From the Menu section just navigate to Appearance >> Editor option to open the “Edit Themes” section.
  • Now select the current theme you are using in your WordPress.
  • Then from the right pane of your theme edit section, just find the functions.php file of your current WordPress theme and open it.
  • Add the following line at the end of function.php file.
    //enable classic editor for wordpress//
    add_filter('use_block_editor_for_post','__return_false');

Now, click on the update file option to save the changes.

This simple WordPress function hack let you enable classic editor for WordPress 5.0 and automatically completely disable the new Gutenberg editor.

However, if you want to use the Classic WordPress plugin to you can download it from the url:

https://wordpress.org/plugins/classic-editor/

In case, if you want to disable WordPress Gutenberg editor, you can choose installing “Disable Gutenberg” WordPress plugin which is available in

https://wordpress.org/plugins/disable-gutenberg/

Also useful: Adsense revenue sharing technique in WordPress multi-author blog