简体   繁体   English

建议改进wp-admin面板性能

[英]Recommendation to improve wp-admin panel performance

Recommendation to improve wp-admin panel performance : Please provide the suggestions and way to identify the bottlenecks in wordpress admin panel issue. 建议改善wp-admin面板性能:请提供建议和方法来识别wordpress管理面板问题中的瓶颈。 It is a multisite and it has 3rd party plugins enabled . 它是一个多站点,它启用了第三方插件。 How to identify plugin conflict and which plugin is causing perf/ memory issues. 如何识别插件冲突以及哪个插件导致性能/内存问题。 All these php-fpm, nginx are running in DOcker container 所有这些php-fpm,nginx都在DOcker容器中运行

Issues observed: During login During Post create new page loading 观察到的问题:登录期间在Post期间创建新页面加载

Here is step by step guide to identify performance issues. 以下是逐步指导以确定性能问题。

  1. If server isn't in production or if it doesn't matter very much, try to switch to any default WordPress theme (TwentySeventeen for example) and look if anything changes. 如果服务器没有投入生产或者无关紧要,请尝试切换到任何默认的WordPress主题(例如TwentySeventeen)并查看是否有任何更改。

  2. You can deactivate all plugins and look if it helps. 您可以停用所有插件并查看是否有帮助。 If yes - try to turn on plugins one by one and this will help you to identify which plugin causes the performance issues. 如果是 - 尝试逐个打开插件,这将帮助您确定哪个插件导致性能问题。

  3. Try to install a free plugin called Debug Bar (you can do it from Plugins-Add New), it will show you slow things on your website 尝试安装一个名为Debug Bar的免费插件(你可以通过Plugins-Add New来实现),它会在你的网站上显示你的慢点

    调试栏插件

  4. Inspecting your browser console also might help. 检查浏览器控制台也可能有所帮助。

Since this issue is caused by the interaction of both your code (plugins) and your production environment, you need some tool that takes all of that into account when attempting to measure the cause. 由于此问题是由代码(插件)和生产环境的交互引起的,因此您需要一些工具在尝试测量原因时将所有这些考虑在内。

I really like New Relic for this. 我真的很喜欢New Relic。 It is a paid product, but with the free trial you might be able to diagnose your issue. 它是付费产品,但通过免费试用,您可能能够诊断出您的问题。 They have a WordPress integration that will show you specifically how many seconds/ms each action hook and plugin is taking. 他们有一个WordPress集成,它将特别向您显示每个动作钩子和插件所花费的秒/ ms。

There are several php performance tools such as XHProf which can help you determine the cause of the problem. 有几个PHP性能工具,如XHProf,可以帮助您确定问题的原因。

Please don't forget to tell us what the problem was, by updating your answer! 请不要忘记通过更新您的答案告诉我们问题是什么!

Can you pls give us a list of PlugIns installed!? 你能给我们一个安装的PlugIns列表吗?

I could tell you for some that they are a waste of memory from my experience... 我可以告诉你一些他们从我的经历中浪费了记忆......

Are you using ie a visual composer plug in, the one named like that is the most worst backend plug in regarding its needs of ressorces and in premium themes it comes most often combined with master slider revolution, which has also crazy memory needs... 你是否正在使用即视觉作曲家插件,这个名称是最糟糕的后端插件,关于它的需求和高级主题,它通常与主滑块革命相结合,这也有疯狂的内存需求......

Do you have in general many plug ins, so let's say more then 10 to 20? 你一般有很多插件,所以让我们说10到20多? Do you need all of them? 你需要所有这些吗? Which are the ones that load when you edit a page in the backend? 在后端编辑页面时加载的是哪些?

If you really need all of them think about renting a better server... ;-) 如果你真的需要他们所有想到租用更好的服务器... ;-)

What I have found during my fight with slow wp-admin is the heartbeat wordpress functionality which is responsible for autosaving and making thousands of copies of same post. 在我与慢速wp-admin的斗争中我发现的是心跳wordpress功能 ,它负责自动保存并制作数千份相同的帖子。 It sets autosave interval. 它设置自动保存间隔。 Its not a performance-killer but in my case (woocommerce with few thousand records) it helped a bit to improved speed of admin panel, may be usefull for you aswell. 它不是一个性能杀手,但在我的情况下(拥有几千条记录的woocommerce)它有助于提高管理面板的速度,对你来说也许是有用的。

You might trying in your functions.php adding the following: 您可以尝试在您的functions.php中添加以下内容:

add_action( 'init', 'stop_heartbeat', 1 );
    function stop_heartbeat() {
    wp_deregister_script('heartbeat');
}

Thanks for all your inputs. 感谢您的所有投入。 I have identified the problem and resolve it . 我已经确定了问题并解决了它。 The problem is with the Network file system and the php script takes more time to read it because the uploaded assets total size is in GB's and the wordpress framework built in Filter will do recursive call to calculate the size. 问题在于网络文件系统和PHP脚本需要更多时间来阅读它,因为上传的资产总大小是GB,而在Filter中构建的wordpress框架将进行递归调用以计算大小。 I have used Debug bar slow action and filter plugin to identify which action / filter is taking more time. 我使用调试栏慢动作和过滤插件来识别哪个动作/过滤器花费更多时间。

Solution: And in admin panel of multisite, there is a setting if you enable then it will skip calculating the size of the disk - Now site is very fast. 解决方案:在多站点的管理面板中,如果启用则有一个设置,然后它将跳过计算磁盘的大小 - 现在站点非常快。 But will lose the functionality of restricting users from uploading ex. 但是会失去限制用户上传ex的功能。 i define 2 gb for each site, then that functionality to restrict users from the disk quota of 2 GB will be disabled. 我为每个站点定义2 GB,然后将禁用用于限制用户2 GB磁盘配额的功能。 Is there a way to tune that stuff ? 有没有办法调整那些东西? Kindly provide your valuable suggestions. 请提供宝贵的建议。

I recommend to make a website backup on another server and check the problem. 我建议在另一台服务器上进行网站备份并检查问题。 If problems is still there, deactivate plugins one by one. 如果仍有问题,请逐个停用插件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM