问题
What tools are there out there for determining why a site takes so long to load pages?
I'm using a very simple theme that I changed to fit my needs, it's a brand new site with only two test posts and it takes a while to load.
I used YSlow for Firebug and it gives the site a Grade A (90) so that doesn't really help. Is there anything else out there that might help me figure out what's going on?
回答1:
try using a profiler like xdebug, how to setup:
http://codex.wordpress.org/Testing_WordPress_Performance#Configuring_Xdebug_for_Profiling
according to your site, the page is taking a long time to generate and doing a fairly large # of queries:
<!-- 28 queries. 2.728 seconds. -->
<!-- Dynamic page generated in 1.553 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-01-12 16:23:03 -->
so.. was there a plugin that was recently added that may be doing a lot of db calls?
supercache will help a lot, requests won't need to run all those queries if the page is cached...
回答2:
Your site has a lot of (relatively large) images, which are scaled to a very small size. I suggest you create thumbnails of the size you need.
Edit: I just reloaded the page, and it goes fairly faster now: most probably because all the images were now buffered.
回答3:
Reverse DNS shows 35 other sites on your shared server at dreamhost; if you're concerned with speed, shared hosting is an issue.
回答4:
Try the Wordpress plugin P3 (Plugin Performance Profiler).
This could help if a plugin is part of the problem.
回答5:
There's a lot of things that could cause this:
- Slow internet connection
- Slow/overloaded shared server
- Wordpress is not the best written code and is quite slow
You can try using a wordpress cache plugin to make things faster (it wont compile the page every time someone accesses the page).
回答6:
I saw a front page load time of 7.5 seconds (according to wp-super-cache).
I'd first look at the amount of content you're listing on the front page. Try reducing it down to just the first day's content at the top and see if the page speeds up. If that works then you need to look at optimizing the content pull on the front page. If those are each a WordPress loop then you're going through a lot of high load routines. You might look at using filters on each of those WP Queries to only pull the small amount of data that you need to display the page.
来源:https://stackoverflow.com/questions/2050329/wordpress-site-painfully-slow