Can’t edit child theme php files after upgrading to Wordpress 4.9

My sites built on Unite are now failing when you go to save any php changes from the appearance editor. This seems to have happened since upgrading to WP 4.9 which introduced some built in error checking when you save.

When I go to save my changes it hangs for ages and then I get this 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.”

I have investigated this quite a bit and many people are saying it was a plugin causing the error for them. However, I have tried switching off all my plugins but this doesn’t help, instead I get the following error which points to Unite being the culprit…
“Your PHP code changes were rolled back due to an error on line 409 of file wp-content/themes/unite/inc/extras.php. Please fix and try saving again.”

Any ideas would be gratefully received.

Geoff

Hello there,

I hope you are doing well today.

You may need to recreate you child theme to edit it because of the recent update. Here is a plugin that you can use to make the child theme:

https://wordpress.org/plugins/child-theme-configurator/

Best Regards,
Support

Thank you very much for the info on this.

If I make a new child theme as you suggest, can I easily copy over my settings (styling etc) from my old child theme? Is it a matter of just copying the theme files over to the new folder?

Many thanks and sorry of this is a basic question.

Thanks again

Geoff

HI Geoff

“If I make a new child theme as you suggest, can I easily copy over my settings (styling etc) from my old child theme?” - Yes, i think you can move them from old child theme,

A couple of other solutions for you,

  1. you can use FileZilla to connect to your server and edit files directly from your PC
  2. You can use your hosting account file manager to edit your files from the server
  3. You can use file manager WordPress plugin to directly, from the WordPress dashboard edit your files