Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WordPress Editor not updating files: Unable to communicate back with site to check for fatal errors

I've run into an issue with updating the header.php file in a WordPress website.

Firstly, I tried updating the file manually through C-Panel -> File Manager. The code appears to stay in the file, but when you view the page source in incognito mode and different web browsers the code doesn't render.

It's not a server problem, I already contacted the server support team and there aren't any error logs being reported by MySQL.

There doesn't appear to be many solutions for this from what I can find from doing some searches on Google.

Full 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.

like image 961
nickhiebertdev Avatar asked Oct 05 '18 18:10

nickhiebertdev


2 Answers

What worked for me is disable all plugins and then re-enable them. This was caused by a wordpress update. Everything is working as expected now, but it was quite frustrating..

PS: Use the bulk deactivate action.

like image 135
Borislav Stoilov Avatar answered Sep 22 '22 15:09

Borislav Stoilov


This error comes from a Wordpress feature included in Wordpress 4.9. It basicaly check for PHP errors upon file uploading in the WP file editor to prevent saving code that could/will break your site.

It's mostly a plugin (or a server configuration) that prevent the Wordpress loopback check to properly check for potential errors caused by your update. As Wordpress is not able to check whether your new code will produce errors or not, it prevents the code update.

Check those links:

  • https://wpengine.com/support/php-editor-errors-wordpress-4-9-higher/
  • https://wordpress.org/support/topic/cant-edit-main-theme-php-files-after-upgrading-to-4-9/

You could try disabling your plugins to see if the feature make it back, or update your files using FTP/SFTP (without the Wordpress file editor).

like image 38
Mtxz Avatar answered Sep 22 '22 15:09

Mtxz