Can't edit the main theme PHP files

I’m encountering a problem where I can’t edit the main theme PHP files. I’m using a 5.3.2 version. I always get the same error that looks like this: You will need to upload your PHP file change by some other means, such as by using SFTP.

I experienced the same issue on two live sites (1 multisite and 1 regular install) as well as a local test environment.

– Updated to 4.9
– Updated all themes and plugins
– Cleared cache, cookies, rebooted, took a walk
– tried editing child theme with and without all plugins disabled.

I was completely unable to edit child theme files without ftp’ing to the server. After uploading, the site ran fine with the edits in place.