Support » Fixing WordPress » Theme Editor – MultiSite always errors when saving code edits.

  • Howdy,

    We’ve made an observation that when using the /wp-admin > Appearance > Theme Editor, and editing the functions.php file and trying to add additional PHP code, it will always generate 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.

    Here is some example code you can try to add, if you wish to test and replicate.

     * Testing Theme Editor Code Addition

    Is this perhaps a new bug, specifically with MultiSite? We have been able to replicate on two independent MultiSite installations, including one that was stripped down to zero plugins activated and the twentynineteen theme activated.

    The issue does not happen on a normal WordPress Installation, running on the same server as the stripped down MultiSite.

    Thanks for any feedback you can provide. We’re curious to know if you are able to test it and does it also replicate on your end?

    Kind regards,

Viewing 2 replies - 1 through 2 (of 2 total)
  • The loopback test shouldn’t be any different on multisite.
    Could you check the Site Health page and see what it reports to see if anything differs between network admin and site admin views?

    Thread Starter wpealbert


    Howdy Joy! Thanks for the advice. I see that the Network Admin doesn’t have a Site Health option, but at least the primary subsite does. I checked it, and was able to get it to 100%!

    Unfortunately, even at 100%, we’re still getting the error when trying to edit the code.

    Do you have any MultiSite Installations of your own? I just want to know that the issue doesn’t replicate on your MultiSite. If anyone is able to do that, I would truly appreciate it!

    Just go to the Theme Editor, find the functions.php file and try to add this line of code to the bottom:

     * Testing Theme Editor Code Addition

    If it does work for you, can you confirm if you have a Subsite or Subdirectory MutliSite configuration?

    Thanks for any assistance!

    • This reply was modified 3 years, 5 months ago by wpealbert.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Theme Editor – MultiSite always errors when saving code edits.’ is closed to new replies.