Support » Localhost Installs » “Sorry, that file cannot be edited.” – Edit Themes

  • michael450045

    (@michael450045)


    Hi all,

    I am having trouble editing any css or php files via the theme editor. The error box comes up “Sorry, that file cannot be edited.” when you click the update file button. This site is based on a localhost using the WAMP work around. I’m not sure if this issue is related to that? I have already completely reinstalled wamp and wordpress only to get the same result on a blank site with no plugins or downloaded themes. I also tried making a child theme which made no difference.

    The only thing i can think of is file permissions but none of the many tutorials i had read mentioned anything regarding it?

    Thanks in advance,
    Michael H

Viewing 2 replies - 1 through 2 (of 2 total)
  • John Torvik

    (@johntorvik)

    Hey,

    Your theme might be disabling the native file editor, so, you can try adding this code at your wp-config.php

    define('DISALLOW_FILE_EDIT', true);

    DionDesigns

    (@diondesigns)

    If it’s a localhost install, there is no need to edit files wuth the usually-does-more-harm-than-good theme editor. You can edit the files with a text editor on your local system (though in Windows, NEVER use the built-in Notepad application).

    (I personally wish the theme/plugin editors would disappear permanently. If the site has an obsolete Apache/nginx configuration, most users will change file permissions to unsafe world-write values instead of updating their webserver to a modern configuration. And even though the cause is almost always bad coding on the part of an author, the plugin/theme editors can break PHP scripts, which usually results in blank pages with HTTP 500 errors.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.