Theme and Plugin Editors won’t save PHP files
-
Context: WordPress 6.1.1, child theme of Hueman Pro, all plugins are current. In addition to a small bit of code in my child theme’s
functions.php
, I have a self-built single-file plugin to house code that is not theme-related. I have not edited my theme code or that little plugin since 2021.Today I tried to edit both of them using WordPress’s Theme File Editor and Plugin File Editor. (I do have FTP, but I thought this would be simpler.) But when I click “Update File” for either functions.php or the plugin (even if I do it with no actual changes), I get this:
“Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over https://FTP.”
However, I can update
style.css
successfully, so apparently the problem is only with PHP files.In FTP I checked permissions – all the files (including style.css and the PHP files) are 644 and have the same owner, so apparently there is something in WordPress itself that is allowing editing of CSS files but not PHP files. I don’t remember whether I used FTP or WordPress’s theme/plugin editors to work on those files in the past, but I know I have used those editors on at least some of the sites I manage, and I don’t remember ever seeing this error before. Searching the web, it seems that most of the complaints about it are more than two years old or caused by something very specific that doesn’t apply to this site. I tested switching to the TwentyTwentyThree theme, in case Hueman Pro had added some sort of restriction, but the behavior was the same. I looked through WordPress settings to see if there was some new safety valve that I needed to disable, but I didn’t see anything like that. Thoughts?
- The topic ‘Theme and Plugin Editors won’t save PHP files’ is closed to new replies.