Title: Cannot update php files in theme editor WordPress 7.1
Last modified: August 25, 2026

---

# Cannot update php files in theme editor WordPress 7.1

 *  [yarr2](https://wordpress.org/support/users/yarr2/)
 * (@yarr2)
 * [1 month ago](https://wordpress.org/support/topic/cannot-update-php-files-in-theme-editor-wordpress-7-1/)
 * Any attempt to update php theme files result in message “Unable to communicate
   back with site to check for fatal errors, so the PHP change was reverted. You
   will need to upload your PHP file change by some other means, such as by using
   SFTP.” Other type files are updating without issues.
 * But if an a block theme is active theme editor appears in Tools menus and php
   theme files of other themes in this case can be successfully updated.
 * What is this? New WordPress behavior or a bug?

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 month ago](https://wordpress.org/support/topic/cannot-update-php-files-in-theme-editor-wordpress-7-1/#post-19002722)
 * If I understand you correctly, you have two concerns:
 * For you, the Theme File Editor is only visible under “Appearance” for classic
   themes, not for block themes. With block themes, it’s generally hidden because
   it’s no longer necessary to edit theme files directly with this type of theme.
 * For classic themes, it’s normally visible unless it’s disabled by the `DISALLOW_FILE_EDIT`
   constant in `wp-config.php` or by a security plugin you’ve installed.
 * If, while editing, you receive the message
 * > Unable to communicate back with the site to check for fatal errors, so the 
   > PHP change was reverted.
 * this indicates exactly that: a fatal PHP error may have occurred while editing
   the file – perhaps due to the changes you made, or possibly because of file permissions.
   Check your hosting provider’s error log for details. There, you should be able
   to identify the cause, which will also reveal the solution.
 * Tip: Try disabling all plugins as a test – security plugins, in particular, are
   likely interfering here.
 *  Thread Starter [yarr2](https://wordpress.org/support/users/yarr2/)
 * (@yarr2)
 * [1 month ago](https://wordpress.org/support/topic/cannot-update-php-files-in-theme-editor-wordpress-7-1/#post-19002931)
 * It’s definitely not a permissions issue – I can modify and save css, js, txt 
   files, but not php, if a non-block theme is active. If theme is not active then
   its php files can be updated.
 * If active theme is a child, then php files both in child and parent themes can’t
   be updated.
 * I have similar setup with 6.9.x and it’s not affected. I just made a new clean
   setup with 7.1 and noticed that strangeness.
 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [1 month ago](https://wordpress.org/support/topic/cannot-update-php-files-in-theme-editor-wordpress-7-1/#post-19002972)
 * I have no trouble editing PHP files in WordPress 7.1 with a classic theme using
   the Theme File Editor. I would therefore still suspect that there’s something
   specific to your project.
 * What did you find when you checked the error log?
 * What happened when you deactivated all the plugins? Also check mu-plugins.
 * Also, as a test, try switching to a different classic theme and see if that works.
 *  Thread Starter [yarr2](https://wordpress.org/support/users/yarr2/)
 * (@yarr2)
 * [1 month ago](https://wordpress.org/support/topic/cannot-update-php-files-in-theme-editor-wordpress-7-1/#post-19004501)
 * This strange behavior occurred because website domain name was not resolving 
   on the server…

Viewing 4 replies - 1 through 4 (of 4 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcannot-update-php-files-in-theme-editor-wordpress-7-1%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [yarr2](https://wordpress.org/support/users/yarr2/)
 * Last activity: [1 month ago](https://wordpress.org/support/topic/cannot-update-php-files-in-theme-editor-wordpress-7-1/#post-19004501)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
