How to Enable Theme Editor in WordPress? Step By Step

Enable theme editor in WordPress site
Enable Theme Editor in WordPress

In this article, I am writing about enable theme editor in WordPress. Normally, the theme editor option is visible when you click or hover on Appearance in the WordPress dashboard.

But sometimes you may observe that the theme editor option is not available in your WordPress dashboard. Why does it happen?

Might be you are using a plugin that has disable your theme editor. A security plugin or any other plugin may be the reason for it. Apart from the plugin, there may be other reasons also. But sometimes it happened due to using a security plugin.

There is no need to be a worry. You can enable theme editor in WordPress by doing a small change in cPanel. In this article, I will explain the complete process to enable theme editor in WordPress.

Let’s understand how you can do it.

Steps to Enable Theme Editor in WordPress

First of all login to cPanel of your website and click on File Manager. Now you will be redirected to a new tab and you will have a Public.html file along with other data.

You just need to do a double-click on the Public.html file. Now find the wp-config.php and select it by doing a single click on it.

wp-config.php file
Select wp-config.php file

After it, do a right-click on wp-config.php and click on the edit option. But before editing, you must take the backup of the file. You can download the file by Select wp-config.php>Right Click>Click on download.

Edit file
wp-config.php>Edit

Now just do right-click on wp-config.php and click on the edit option. When you will click on edit, a popup window will appear. Click on edit on the popup window.

edit popup
A popup while editing file

When you will click on edit, the codes will appear. You just need to find the following code-

define( ‘DISALLOW_FILE_EDIT’, true );

Now you just need to replace true with false. You need to delete true and write false in the same place. After replacing true with false, you just click on save changes.

Be careful while doing this editing. If you are not comfortable, you may take the help of someone who can do it.

Summary:

  • Login to Cpanel of your website.
  • Find File Manager in your CcPanel.
  • Click on File Manager.
  • Find Public.html.
  • Double Click on Public.html.
  • Click and select wp-confg.php. You can select by doing a single click on it.
  • Do a Right Click on wp-confg.php.
  • Click on Edit option (Download and take backup of the file before editing).
  • A popup window will appear on the screen.
  • Click on Edit Button and codes will be opened.
  • Replace true with false in the following code – define( ‘DISALLOW_FILE_EDIT’, true );
  • Click on Save Changes.

In this way, you can enable theme editor in WordPress. After enabling the theme editor you can cross-check it from your WordPress dashboard.

Conclusion

Mostly, I use the theme editor to add codes and scripts to the website. Maybe you want to add some codes in headers or footers or anywhere else on your website. But if your theme editor option is disabled then you may face problems.

However, you can enable it through your Cpanel. As you can see above that you can enable theme editor in WordPress by doing a small change.

Whenever you do any changes in your root directory, you must take a backup of your files. So that if you face any problem after editing files, you can restore them.

I have tried to explain the complete process in the easiest way. And I hope you you find this article useful for you.

Read More Articles:

Insert Headers and Footers By WPBeginner

How to Set target Country In Google Search Console?

How to Disable WordPress Comments for a Specific Post?

Previous articleInsert Headers and Footers BY WPBeginner Plugin – Review
Next articleWhat is Affiliate Marketing? A Brief Overview of it