WordPress theme editor is missing
Asked Answered
J

13

21

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?

Jp answered 17/7, 2016 at 23:24 Comment(0)
L
51

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

Lawerencelawes answered 8/6, 2017 at 21:13 Comment(3)
I can't find 'Security' within 'Dashboard'Palette
In Ithemes Security setting -> settings -> advanced -> Wordpress Tweaks then uncheck: Disable File EditorSudarium
Try to find it here: Appearance -> Theme File EditorUrban
C
17

Open up your wp-config.php file, and search for

define('DISALLOW_FILE_EDIT', true);

Change true to false:

define('DISALLOW_FILE_EDIT', false);
Chelseychelsie answered 18/7, 2016 at 21:42 Comment(0)
M
8

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.

Mccool answered 14/12, 2021 at 5:38 Comment(2)
saved my day...Pythagoras
Mine also, thanks :)Bebe
T
6

Hack:

Manually browse: domain.com/wp-admin/theme-editor.php

Treenatreenail answered 25/9, 2019 at 14:38 Comment(3)
This won't work. The following issue will occur. You do not have sufficient permissions to access this page.Pistachio
Worked for me on wordpress.com.Haroldharolda
@BeaST30 may be you are not admin of that site.Treenatreenail
T
5

If you used Siteground host.. you can enable theme editor that option:

  1. Go to domain.com/wp-admin.php
  2. SG Security
  3. Site Security
  4. Disable Themes & Plugins Editor Option

I hope this is useful for you.

Teodorateodorico answered 21/1, 2022 at 23:26 Comment(0)
S
3

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);
Swelling answered 18/12, 2020 at 10:9 Comment(0)
E
1

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.

Eldred answered 9/8, 2019 at 19:20 Comment(0)
G
1

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.

Grassgreen answered 29/11, 2021 at 22:40 Comment(0)
C
1

Remove both codes

define('DISALLOW_FILE_EDIT', false);
define('DISALLOW_FILE_MODS', true);

After this just refresh, the dashboard Theme editor will appear.

Christyna answered 7/12, 2021 at 8:34 Comment(0)
M
0

To enable the theme editor, follow these steps:

  1. Go to Appearance, select one theme (any one you like) and activate it.
  2. In this activated theme, go to AppearanceEditor → select the theme to edit (on the top right, above Templates. There is a drop-down click on it and select your previous theme.)
  3. Now select config.php or demo config.php and remove the define ( 'DISALLOW_FILE_EDIT, true); code.
  4. Now click on Update file.
  5. Now change the theme to your previous theme.

Now you can find your editor in the Appearance drop-down.

Merely answered 1/10, 2017 at 14:54 Comment(2)
thank you but i could find appearance in the options of porto themes for wordpress.Moneymaker
This isn't correct, the questioner's issue is that appearance --> editor isn't appearing, you're telling them to use that path within the answer. The problem is a security setting as talked about below, they need to go into wp-config.php or deactivate this security feature with the plugin they are using.Garton
F
0

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.

Faze answered 4/4, 2023 at 14:21 Comment(0)
H
0

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/

Haldas answered 12/5, 2023 at 13:23 Comment(0)
C
0

If using SiteGround, you first need to Disable Themes & Plugins Editor Option, like this..

  1. Go to domain.com/wp-admin.php
  2. Security Optimizer
  3. Site Security
  4. Disable Themes & Plugins Editor Option

*Then you will see the file in Tools > Theme File Editor

Counteraccusation answered 6/6 at 14:58 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.