I see a lot of people complain about their WordPress site being slow to load.
The Internet is full of complaints about this issue and people asking for help to fix it.
Then you do simple profiling of their site and see stuff like
2.7 MB downloaded
(1.2 MB from cache)
20.85s (onload: 14.35s)
Those are ridiculous numbers!
First the requests should not be much more than 30, the lower the better.
All of these numbers = (the lower the better)
The biggest issues here are these
- To many plugins installed
- To many social plugins (most social plugins are terrible for page load)
- All of the CSS for everything under the sun is in its own separate files
- Facebook widgets are evil for page load.
- Themes that don’t use sprites
- Themes that do not combine and minify CSS and JS (Premium too)
- Post images and even theme graphics that are not optimised.
- etc… This list goes on…..
Don’t load so many posts on your blog page.
Limit it to 5 or even 3 posts. It will help.
Plugins can cause a lot of issues if they are not optimised.
They usually add their own CSS and JS to the header. = (more requests = bad for page load)
Limit your active and installed plugins. If you don’t need it, get rid of it.
Plugins also add database queries in most situations depending on the plugin.
Database queries can get expensive. Queries need to be kept down around 20-30 at most which is still high for shared hosting.
Most social plugins have CSS, JS and then images added to the pages.
If the icons are not sprited these add up quickly.
If you must do social, find one sprited, and use only it, not 3 different plugins.
Your post images should be optimised, made as small as possible.
If you post has a lot of images, use the MORE tag so they are not all loaded on your blog every page load.
Do it your self, or find a programmer to combine and minimise all of your requests.
It can get expensive and take a lot of time to do!
If you have 40 plugins installed and active (which you shouldn’t) don’t expect to get your site optimised for $50 dollars.
The theme and plugins will all have to be gone through and maybe even heavily modified depending how bad they are.
Anther thing is caching and APC.
You can find a host that has APC Opti-cache on their system.
It helps WordPress’s memory use and will speed the site up some.
Caching the database queries and save a lot on page load.
Caching can save a lot of load time as seen above.
NOTE: I don’t use any of the popular plugins. I have my own caching that I implement.
Also that memory usage is the result of APC, its much/much higher without it.
You can use FireBug for FireFox or Chromes built in dev tools.
Under the Network tabs you will see everything you are downloading when viewing the page.
These are the items and numbers that need to be worked on.
Also PageSpeed plugin by Google for Firefox.
I use this a lot.
Yslow by Yahoo is another decent plugin.
You need to make results like this
404 Not Found’s are bad
End up with results like this
and at least this in Yslow
Yslow can be hard to make happy sometimes.
Optimisations like this do not just go for WordPress, but all sites and types of platforms.
Optimising your site will help make the internet faster and your users happier.
I may do some videos on doing some optimising in the future.