Title: Theme File Editor
Last modified: July 5, 2023

---

# Theme File Editor

 *  [ecoachable](https://wordpress.org/support/users/wbcilearn/)
 * (@wbcilearn)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/theme-file-editor/)
 * The theme file editor option is missing from Appearance. At first, it was there
   and when I clicked on it, it gave me a message that you are not allowed to edit
   this file although I am the manager. I went back to the link right after and 
   it was gone.
 * This is what I see under the Theme File Editor file under WP Manager : file:///
   C:/Users/cspar/Downloads/theme-editor.php#:~:text=if%20(%20!%20current_user_can(%
   20%27edit_themes%27%20)%20)%20%7B%0A%09wp_die(%20%27%3Cp%3E%27%20.%20__(%20%27Sorry%
   2C%20you%20are%20not%20allowed%20to%20edit%20templates%20for%20this%20site.%27%
   20)%20.%20%27%3C/p%3E%27%20)%3B%0A%7D
 * if ( ! current_user_can( ‘edit_themes’ ) ) {
   wp_die( ‘
 * ‘ . __( ‘Sorry, you are not allowed to edit templates for this site.’ ) . ” );
   }
 * Please advise.
    -  This topic was modified 2 years, 11 months ago by [ecoachable](https://wordpress.org/support/users/wbcilearn/).
      Reason: Added error message
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ftheme-file-editor%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [Baljeet Uppal](https://wordpress.org/support/users/baljeetuppal/)
 * (@baljeetuppal)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/theme-file-editor/#post-16870659)
 * hi [@wbcilearn](https://wordpress.org/support/users/wbcilearn/)
 * first check you have any active theme, if yes, then disable all plugins and check
   again the “theme editor”.
 * if still, you getting the same error then go to your server or cpanel, open the
   root directory where your WordPress files are, then find and edit the **“wp-config.
   php” file**.
 * Next, within the Code Editor field locate the following line: “**define(‘DISALLOW_FILE_EDIT’,
   true)**“. Once located, simply **change the text line “true” to “false”** and
   click **Save & Close**.
 * hope it will help you to sort out your issue

Viewing 1 replies (of 1 total)

The topic ‘Theme File Editor’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [Baljeet Uppal](https://wordpress.org/support/users/baljeetuppal/)
 * Last activity: [2 years, 11 months ago](https://wordpress.org/support/topic/theme-file-editor/#post-16870659)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
