我如何弄清楚为什么我的Wordpress页面加载这么慢? [英] How can I figure out why my Wordpress pages load so slowly?

查看:262
本文介绍了我如何弄清楚为什么我的Wordpress页面加载这么慢?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

但是我的网站页面加载非常缓慢.通常,页面渲染之前会有2-3秒的延迟,而我不知道为什么.

  • 我的网站由Wordpress v3.4.2.供电.

  • 我所在的专用虚拟服务器上具有大量资源,并且 带宽.

  • 没有巨大的图像加载.

  • 我的CSS文件在JS脚本之前加载.

我花了很多时间尝试在平台(Wordpress +插件等)的约束下优化网站.我不希望自己的网站超级快,但是我需要它不会太慢.

我正在使用Chrome的开发人员工具审核我的网站,但是这些建议似乎并不能说明加载时间长(未使用的CSS规则等).当我查看时间线时,最初看到的加载时间是2.7倍,但是我不知道为什么.谁能帮助我深入了解这个问题?

我的网站位于此处.主页上有一些额外的脚本,因此查看此页面可能会更有用.

解决方案

我发现了这个精湛的指南,它确实帮助我克服了优化Apache与WordPress一起使用的泥潭:

http://thethemefoundry.com/blog/optimize-apache-wordpress/

您说您有一个虚拟服务器,因此当前已设置为可以加载每个模块-如果您消除了不必要的模块,则会在此处显着提高速度.备份配置文件,以防万一.

也-通过SSH使用TOP命令来查看PHP正在使用多少内存.目前可能很多.通过消除上述链接中的模块,所有这些都将得到改善.您没有提到VPS上有多少内存,但是很有可能您的性能问题是由内存颠簸引起的,通过使用上面的链接减少每个PHP实例消耗的内存量,可以大大缓解这种情况.

此外,找出性能问题的真正来源也很重要-一个名为WP Tuner的很棒的小插件可以帮助我找到性能瓶颈.原始插件不兼容,但是其他人已经编写了升级文件:

http://www.wwvalue.com/tuts/tut-wp/wordpress-profiler-tuner-revised.html

这将帮助您确定页面中哪些特定部分的加载时间最长,因此您将立即发现性能瓶颈.

此外,一个不错的名为Debug Queries的插件对于跟踪性能问题很有用,尽管上面的wordpress profiler实际上也可以跟踪查询.

最后-对于这个关于性能的WordPress.org讨论,我不能给予足够的推荐,特别是关于W3 Total Cache与Super Cache(两者都很出色).

对于任何寻求瞬间响应时间的人来说,这都是一个很棒的读物: http://wordpress.org/support/topic/wp -super-cache-vs-w3-total-cache

我在一个站点上使用W3总缓存,在另一个站点上使用WP Super缓存.两者都很棒.我都用过,所以我可以了解两者.我想说的是,如果您要获得出色的性能,请使用WP Super缓存以及以上链接中推荐的所有其他工具,但是如果您想获得即时的性能,则W3总缓存在其初始设置中会更全面. /p>

希望有帮助.

Yet my site pages load very slowly. Usually there's a 2-3 second lag before the page renders, and I cannot figure out why.

  • My site is powered by Wordpress v3.4.2.

  • I'm on a dedicated virtual server with plenty of resources and bandwidth.

  • There are no huge images loading.

  • My CSS files load before JS scripts.

I've spent a lot of time trying to optimize the site within the constraints of the platform (Wordpress + plugins, etc). I don't expect my site to be SUPER fast, but I need it to not be SO slow.

I'm using Chrome's developer tools to audit my site but the suggestions do not appear to explain the long load time (unused CSS rules, etc). When I look at the timeline, I see a 2.7x second load time initially but I can't figure out why. Can anyone help me get to the bottom of this?

My site is located here. The homepage has some extra scripts, so it may be more helpful to look at this page.

解决方案

I found this superb guide which really helped me fight through the mire of optimising Apache for use with WordPress:

http://thethemefoundry.com/blog/optimize-apache-wordpress/

You said you have a virtual server so chances are it's currently set up to load EVERY module - you'll find a great speed boost here if you eliminate unnecessary modules. Keep a backup of your config file in case you screw it up.

Also - use the TOP command through SSH to see how much memory PHP is using. Probably a lot currently. This will all be improved through eliminating modules as per above link. You don't mention how much memory you have on your VPS but there's a good chance your performance issues are coming from memory thrashing which will be mitigated significantly by reducing how much memory each PHP instance consumes using the link above.

Also, it matters to find out where your performance issues are actually coming from – a great little plugin called WP Tuner helps me locate performance bottlenecks. The original plugin is incompatible but someone else has written an upgrade:

http://www.wwvalue.com/tuts/tut-wp/wordpress-profiler-tuner-revised.html

That will help you identify which specific parts of the page are taking the longest to load so you will immediately find your performance bottleneck.

In addition, a cool plugin called Debug Queries is useful for tracking down performance issues although the wordpress profiler above actually does track queries too.

Finally – I can’t recommend highly enough this WordPress.org discussion on performance, and specifically on W3 Total Cache vs Super Cache (both are excellent).

It’s a fantastic read for anyone looking for split-second response times: http://wordpress.org/support/topic/wp-super-cache-vs-w3-total-cache

I use W3 total cache on one of my sites and WP Super Cache on another. Both are great. I used both so I could learn about both. I would say use WP Super cache plus all the other tools the guy at the link above recommends if you're looking for extreme performance, but if you're looking to get immediate performance W3 total cache is more comprehensive in its initial setup.

Hope that helps.

这篇关于我如何弄清楚为什么我的Wordpress页面加载这么慢?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆