Unable to change PHP code. Any help?

Hi there, I’m unable to change the hard code at the very top of my web page. https://www.ylpl.org/

In my dashboard, I go to: Appearance -> Theme Editor -> Theme Function but receive the 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’m not an expert in web design, especially back end php code, that’s why X has been so great for me. What steps do I need to take to help edit my page? Any advice or tips would be greatly appreciated.

Thanks!

Daniel

Hi Daniel,

It would be best to make the changes to the PHP files through FTP and not through the Wordpress admin area. That is because if you added some codes in the files that produces errors, you will not be able to access your site. If you edit the PHP files through the Wordpress admin, Wordpress itself will provide a warning message which is what you are seeing right now to prevent the issue I mentioned from happening.

So first, please make sure you are not editing the core files and you edit the files through the child theme.

Then you can make the changes through FTP.

https://wordpress.org/support/article/editing-files/#editing-files-offline

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.