Can’t edit theme php files after upgrading to wordpress 4.9

Error – :

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.



Sorry, that file cannot be edited.

Most of the wordpress users are facing issue with modifying template files from native editor after updating wordpress to 4.9.  it seems bug (or may be security improvement 🙂 ) and there are some workarounds to avoid this issue as below:


1> you can simply install “wp editor” plugin By Benjamin Rojas ( View details) and edit your files.

2> most of the people are trying to modify php files that means they know the wordpress php code and files structure. considering this i suggest one more option/ workaround .

you can replace below 2 files from older version of wordpress. make sure that you take file and DB backup before you perform any action on wordpress files.



you can replace the files with the same named files from build 4.8.3


(Visited 4 times, 1 visits today)
, , , , , ,

By Arun Sabale

Arun is a Solution Architect on enterprise client management with more than 14 years of experience in IT. Arun Sabale is Blogger and tech enthusiast. His main focus is on Azure cloud infra, Cloud automation with powershell, python, ARM terraform and all cloud infra services like compute, storage, network, automation, function api etc... LinkedIN -