网站优化

网站优化

Products

当前位置:首页 > 网站优化 >

WordPress编辑器不更新文件:无法与站点通信以检查致命错误

GG网络技术分享 2025-03-18 16:12 2


问题描述:

Hello fellow developers and problem-solvers. 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.

Any help at all would be greatly appreciated.

图片转代码服务由CSDN问答提供

感谢您的意见,我们尽快改进~

功能建议

Hello其他开发人员和问题解决者。 我在更新WordPress网站中的header.php文件时遇到了一个问题。</ p>

首先,我尝试通过C-Panel手动更新文件 - &gt; 文件管理器。 代码似乎保留在文件中,但是当您以隐身模式和不同的Web浏览器查看页面源代码时,代码无法呈现。</ p>

这不是服务器问题,我已经联系 服务器支持团队并没有MySQL报告的任何错误日志。</ p>

在Google上进行一些搜索时,我找不到很多解决方案 。</ p>

完整错误</ strong> </ p>

无法与网站通信以检查致命错误,因此 PHP的变化被还原了。 您需要通过其他方式上传PHP文件更改,例如使用SFTP。</ p>

</ blockquote>

任何帮助都将非常感谢。 </ p>

</ div>

网友观点:

Now, this technically didn\'t fix the issue at hand. But I just added a WordPress plugin called Insert Headers and Footers and I added the header script and it worked successfully.

###

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:

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

###

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.

###

I had a similar issue, my wordpress version is 5.2.2.

\\\"Database Browser\\\" plugin, which is untested with my version of WordPress created the issue. It was fixed by deactivating that plugin.

So check the plugins which are \\\"Untested with your version of WordPress\\\" ( this can be seen while installing a plugin from dashboard-> plugins-> Add new ), deactivate them (if unnecessary ) and try using \\\"theme editor\\\" for updating file.

标签:

提交需求或反馈

Demand feedback