user3192304
user3192304

Reputation: 347

WordPress theme editor is missing

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

Answers (13)

sizzlecookie
sizzlecookie

Reputation: 288

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

Upvotes: 0

stepiadm
stepiadm

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

Jules Colle
Jules Colle

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

Md Masud
Md Masud

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

Khaled Daqqa
Khaled Daqqa

Reputation: 61

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.

Upvotes: 5

Harsh Prajapati
Harsh Prajapati

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

eldervl
eldervl

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

Atif Tariq
Atif Tariq

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

Rashedul Islam Sagor
Rashedul Islam Sagor

Reputation: 2059

Hack:

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

Upvotes: 6

Tim Leon
Tim Leon

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

Silpa
Silpa

Reputation: 41

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.

Upvotes: 0

Peter
Peter

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

Jirka Štencek
Jirka Štencek

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

Related Questions