Support » Fixing WordPress » Can’t edit main theme php files after upgrading to 4.9

  • I am unable to edit main theme (php) files using the build in WordPress editor after upgrading to version 4.9. I get the following 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.

    I have cleared my browser cache, cleared my website cache, de-activated all plugins and reinstalled main theme.

    Furthermore; I am able to edit php files in other themes without issues. I have also checked my permissions and ownership of all files. Everything seems perfect.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 31 through 45 (of 126 total)
  • Another plugin that I’ve found causes a conflict: GeoDirectory (This was on another site and on this site I did not use wp-spamshield.

    I’ve also noticed that the customizer fails to save changes as well. So this does’nt just affect the editor.

    • This reply was modified 3 weeks, 4 days ago by  Darryl.R.

    I have the same issue, I have a child theme and found that if I revert back to a parent theme all works fine.

    @centrespot So you can edit the functions.php in the parent theme and not in the child theme? That does not make any sense. I cant edit neither one.

    [BackuPs] Yes it works as it should using all my parent themes but as soon as I try a child theme the problem starts.
    Like everyone else I first removed all the plugins but that didn’t make any difference.

    Moderator Marius L. J.

    (@clorith)

    I am really unable to replicate the issue still, I’ve even used the same host as you (Tier), with a replicated setup based on your debug data and I can still save things, so I am still inclined to thing it’s something unique to your setup(s), there must be something that’s identical on all of them, how did you install WordPress… could you paste the content of your .htaccess file, that might have something of relevance.

    My .htaccess is as follows

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    My installation was via 1and1.co.uk

    @clorith I will drop it at tier support and tmz support. Maybe they can find something in a log file that i dont see.

    As for the wp install I just uploaded wp by ftp and ran the setup. Did not use the wp installer in the cpanel.

    I will try and turn off php 7 and litespeed and see what happens.

    @clorith For your reference, if I have my child theme active then I can’t update any files using the editor but if I make one of my parent themes active I can then update the parent files and also update the child files through the theme editor (theme-editor.php)

    I am also experiencing this problem. Tried disabling all plugins and clearing cache. I’m on Apache server with PHP 7.0.25. If I try to edit the php files in my active theme using the editor I get “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.”

    If I select an inactive theme I can edit the files without a problem. If I change themes it’s always the active one that returns the error message when I try to update one of its pages (even if I don’t make any changes). Updating css files in active or inactive theme isn’t a problem.

    @clorith @padraigbeirne You are so right… it is indeed the active theme or when a child theme is active i cant edit the child theme and parent theme.

    If i activate the parent theme i can edit the child theme. If i activate the child theme i cant edit the parent and the child theme.

    BUT I can edit any theme that is not active.

    Thanks for the hint.

    Update: if i look at the code in the file.php they are actually checking if it is active and if so do the so called checks for security stuff…

    I tried to edit Twenty Fourteen: content-page.php and receive the following 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.”

    I don’t know what good intentions programmers had, but I want to be able to edit my files. For me that is a deal breaker.

    I this going to be fixed?

    Sincerely, Dovid

    @padraigbeirne who is your host?
    @debresser who is your host?

    @backups I am not sure I understand the question. If I understand correctly, then you mean what domain my WordPress blog is located on. That would be my own website, http://www.doviddebresser.info, which is hosted by Hostgator.

    • This reply was modified 3 weeks, 4 days ago by  Debresser.

    @debresser where is your website located? What hosting company? Hostgators, BlueHost, GoDaddy? Which company do you pay for the website to serve it on the internet?

    Update: you already answered the question by editing your reply. Thank you !

    But this http://www.doviddebresser.info/ does not look that it is a wordpress website. 🙁

Viewing 15 replies - 31 through 45 (of 126 total)
  • The topic ‘Can’t edit main theme php files after upgrading to 4.9’ is closed to new replies.