Reputation: 347
I am trying to access the theme editor in WordPress.
The problem is that I cannot find the option under Admin-Appearances - Editor and when I try to access the page using the link http://www.nameofsite.com/wp-admin/theme-editor.php I get the error:
You do not have sufficient permissions to access this page.
I am logged in as an administrator. Why can't I find the editor option?
Upvotes: 21
Views: 145019
Reputation: 288
If using SiteGround, you first need to Disable Themes & Plugins Editor Option, like this..
*Then you will see the file in Tools > Theme File Editor
Upvotes: 0
Reputation: 21
Remove both codes
define('DISALLOW_FILE_EDIT', false);
define('DISALLOW_FILE_MODS', true);
After this just refresh, the dashboard Theme editor will appear.
Upvotes: 1
Reputation: 11939
Note that when you are using a block enabled theme, it's no longer possible to edit your theme and plugin files directly from within WordPress. https://wordpress.org/support/topic/link-to-plugin-editor-missing-when-using-twenty-twenty-two-theme/
Upvotes: 0
Reputation: 2713
There might have set DISALLOW_FILE_EDIT
constant value to true
somewhere in your wordpress website.
All you need to do is set that value to false
.
define('DISALLOW_FILE_EDIT', false);
It should be in wp-config.php
or wp-settings.php
usually. But it could be in some where else depends on the website builder.
Upvotes: 0
Reputation: 61
If you used Siteground host.. you can enable theme editor that option:
I hope this is useful for you.
Upvotes: 5
Reputation: 590
For those who are using Siteground hosting define('DISALLOW_FILE_EDIT', false);
won't work. Sitegound hosting provide SG Security plugin by default on direct WordPress installation from cPanel and it blocks the Theme Editor
and Plugin Editor
option by default.
To enable the Theme Editor and Plugin Editor option you just need to disable the option called Disable Themes & Plugins Editor
under Site Security. Here is the path to disable that option :
Click on SG Security -> Site Security -> Disable Themes & Plugins Editor Option
That's it. I hope you find it useful.
Upvotes: 10
Reputation: 11
It is also possible that it is being blocked by a security plugin or the like. In my case SG security (from siteground) had an option active that deactivated the editor.
Upvotes: 1
Reputation: 2772
At root directory of your wordpress. Open up your wp-config.php file, and search for
define('DISALLOW_FILE_EDIT', true);
Change true to false:
define('DISALLOW_FILE_EDIT', false);
Upvotes: 3
Reputation: 2059
Manually browse: domain.com/wp-admin/theme-editor.php
Upvotes: 6
Reputation: 11
The Sucuri WordPress plugin will also disable the editor in its settings under the "Hardening" tab. You can click on Revert Hardening, make your changes, and then go back and apply hardening when you're finished.
Upvotes: 1
Reputation: 41
To enable the theme editor, follow these steps:
Now you can find your editor in the Appearance drop-down.
Upvotes: 0
Reputation: 630
Open up your wp-config.php file, and search for
define('DISALLOW_FILE_EDIT', true);
Change true to false:
define('DISALLOW_FILE_EDIT', false);
Upvotes: 17
Reputation: 536
It is probably because of iThemes Security and its settings. So yeah, just go to wp-config and change DISALLOW_FILE_EDIT to false.
define( 'DISALLOW_FILE_EDIT', false );
Or just switch it off here: Dashboard -> Security -> WordPress Tweaks -> Configure Settings
Uncheck: Disable File Editor
Upvotes: 52