• I’m in the process of transferring a site to a new server. Everything works find except when I try to save a PHP file from the theme editor now I’m getting error “Scrape key check failed. Please try again” when saving the file.
    I know it’s not recommended to edit files from the Theme Editor, but the point is that it is supposed to work. Also, saving changes to the sytle.css, for example, works.
    This is on WordPress 5.9.3.
    I have disabled all the plugins, and the problem is still happening.
    I have searched online and not much information can be found.
    However, I have found a post that mentions editing the “file.php” file in the wp-admin/includes folder to fix the problem.
    The post says to comment out the if ( $is_active && 'php' === $extension) { on line 509, and replace it with if ( $is_active && 'php' === $extension && false) {, and this solutions works, but I shouldn’t have to edit the anything on the wp-admin folder.
    Is this a problem with workdpress current version, or is there a better solution?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator t-p

    (@t-p)

    This may be a plugin or theme conflict. Please attempt to disable all plugins, and use one of the default (Twenty*) themes. If the problem goes away, enable them one by one to identify the source of your troubles.

    Thread Starter wpmhweb

    (@wppit)

    @t-p It would appear that this is a problem with the theme. I’m using a custom theme I built, and I’ve been using it for a long time without issue. How could I start troubleshooting the problem? Thanks,

    Thread Starter wpmhweb

    (@wppit)

    @t-p I have installed the theme on another server, and PHP files are saving without issues. What could be the problem if disabling all the plugins is not the issue and the theme works on another server?
    Could it be some permissions issue?

    Also, I have to update my first response. I can see the error on any theme, it just happened with TwentyTwenty Two.

    • This reply was modified 2 years, 11 months ago by wpmhweb.
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to fix Scrape key check failed saving php files from the Themes Editor?’ is closed to new replies.