Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

Tips for faster performance (site load times)

  1. @CAD bloke ... RSS feeds are not working on my site inside the firewall because the IT department has it locked down. I can't even get FLICKR RSS to work :-( WP_Super_Cache had no effect on the performance so it was getting frustrating. The IT department told me it was my application and when I talked to Wordpress people they said it was the server. Now I know it is the combo that was the problem. Wordpress in this case had to give into the firewall problem.

  2. Last night someone Stumbled upon an image on one of my sites. Five hundred hits later my host (Bluehost) suspended my account for five minutes. Apparently I used too much CPU. The CPU exceed logs seemed to point towards the WordTube widget.

    I've followed some of Justin's advice on this thread - scaling down some images and the header. I also installed WP Super Cache. I'm not panicking. The site in question draws around 5000 page views a day which I don't think makes caching necessary. I installed it just in case.

    Here's my question...

    WP Super Cache basically makes Stat Press and Google Analytics useless - in my experience. My stats for the passed day are a fraction of what they should be so it makes sense that they are only registering pages that haven't already been cached.

    Is there any way around this? Does anyone have any experience with Awstats? What about WordPress.com Stats?

    All of my sites are linked to from the link below. The one in question is called Critteristic.

    http://devdisko.com/

  3. You must be a logged-in exclusive member to view this reply.

  4. Yeah, I agree. I think I might kill off WordTube as it seems to be the main culprit. A few hundred hits at once + WordTube = trouble!

  5. This thread is an excellent resource. I have some questions, if I may.

    1. I use the following Plugins and I am wondering if I should do without them and use redirects instead. Would it make any difference? And if so, how would the redirects be done, and can it be done from a cPanel (I'm htacess illiterate)? (I use Hostgator.) These are the plugins:

    Enforce WWW preference http://txfx.net/code/wordpress/enforce-www-preference/
    Feedburner Feedsmith

    2. Is there a good tutorial somewhere for optimizing images with Photoshop? I have CS3.

    3. gif, jpeg, png ... are there differences in terms of load time (other than size) and are there right and wrong times to use each? I have never fully understood it.

  6. You must be a logged-in exclusive member to view this reply.

  7. when using photoshop
    Choose File > Save for web

    if I recall right it is super easy and you can see the different file sizes and how much it will reduce size. I no longer have it or I could help more.

    I think jpegs are best for photos on a blog

    Google - tutorial for optimizing images with Photoshop and there are tons though

  8. @ Justin - thanks very much, that is extremely helpful. Makes sense.

    @ slipp2 - thanks, I have finally started using it and re-uploaded several of my images. Makes a big difference!

  9. http://wordpress.org/extend/plugins/wptuner/ is a great plugin for seeing what's happening with database hits and timing.

    After reading this and a bit of messing around I'm shying away from caching too. Hell, I'm just not that popular. Also, I intend to run a forum plugin (http://simplepressforum.com/) which definitely does not want to be cached. It's easy enough to exclude from the cache but, hell - I'm just not that popular.

  10. Just adding this article about downsides of css import to the thread:

    http://www.stevesouders.com/blog/2009/04/09/dont-use-import/

  11. RE: I use PhotoShop CS2 to optimize my images, ... Please share any other software or services (free or paid) that work for you.

    This is the closes editor to PhotoShop. And its The Best for Free

    Inside FireFox:
    Go to: Tools > Add-ons>Search>Pixlr> ADD it

  12. You can try Fireworks... Its Export Wizard is simple and the whole software si less complicated than Photoshop. If you want freeware try GIMP - best alternative.

    Regards
    TJ

  13. http://wordpress.org/extend/plugins/wp-smushit/

    Yahoo's excellent Exceptional Performance series recommends optimizing images in several lossless ways:

    * stripping meta data from JPEGs
    * optimizing JPEG compression
    * converting certain GIFs to indexed PNGs
    * stripping the un-used colours from indexed images

    Smush.it offers an API that performs these optimizations (except for stripping JPEG meta data) automatically, and this plugin seamlessly integrates Smush.it with WordPress.
    How does it work?

    Every image you add to a page or post will be automatically run through Smush.it behind the scenes. You don’t have to do anything different.

  14. Google with new FF Firebug extension: PageSpeed:

    http://google-code-updates.blogspot.com/2009/06/introducing-page-speed.html
    http://code.google.com/speed/page-speed/

    Web Performance Best Practices

    When you profile a web page with Page Speed, it evaluates the page's conformance to a number of different rules. These rules are general front-end best practices you can apply at any stage of web development. We provide documentation of each of the rules here, so whether or not you run the Page Speed tool — maybe you're just developing a brand new site and aren't ready to test it — you can refer to these pages at any time. We give you specific tips and suggestions for how you can best implement the rules and incorporate them into your development process.

    A one stop resource ;)
    http://code.google.com/speed/page-speed/docs/rules_intro.html

  15. http://wordpress.org/extend/plugins/wp-smushit/

    Works great. No fuzz.

  16. I've had amazing results from http://wordpress.org/extend/plugins/web-optimizer/ The only thing it won't play with is an ajax-powered as-you-type search plugin at http://wordpress.org/extend/plugins/daves-wordpress-live-search/ which is a shame.

    Web optimizer even seems to work fine with Hybrid News, WPtouch and Mobile edition all alongside each other.

    Other users have reported disasters of varying proportions so definitely try this on a sandpit site first and back up along the way. I did.

  17. I have since gone off web-optimizer (see above) - it got too clever and too hard to keep it reliable & it kept trying to bookmark my pages in Firefox. Too hard. I am presently using http://wordpress.org/extend/plugins/wp-minify/ and Super-cache. I set the cache expiry for both to a couple of days. Once I stop tinkering (breaking things) I may set the times even longer. It's not a busy site. I find Super-cache makes for faster page loads as long as it isn't building the cache for the first viewing.

    Something that has made a huge, I said H U G E, difference in page-loading times is setting long client-side expiry on everything I can and pre-Gzipping as much content as possible. These are set in .htaccess so you will need access to that. Be CAREFUL - even the slightest typo in .htaccess will take your whole site off the air - instantly! Always keep a backup / original working (!) .htaccess ready to roll-back to in a moment's notice... if you're crazy enough to experiment with it on a live site. Who me?

    A good link to .htaccess info: http://www.samaxes.com/2009/01/more-on-compressing-and-caching-your-site-with-htaccess/

    You will notice in the Hybrid etc. themes there are *.gz copies of CSS files etc. If you can serve these then that will cut a lot of overhead. Here's how to do that (in .htaccess) (lines starting with # are comments)

    RewriteEngine on
    #Check to see if browser can accept gzip files. If so and we have it - serve it!
    ReWriteCond %{HTTP:accept-encoding} gzip
    RewriteCond %{HTTP_USER_AGENT} !Safari
    #make sure there's no trailing .gz on the url
    ReWriteCond %{REQUEST_FILENAME} !^.+\.gz$
    #check to see if a .gz version of the file exists.
    RewriteCond %{REQUEST_FILENAME}.gz -f
    #All conditions met so add .gz to URL filename (invisibly)
    RewriteRule ^(.+) $1.gz [QSA,L]

    I put this rule after the Super-cache rules but before the rules that get the server to gzip something that isn't already g-zipped. They get gzipped per-request so that can get expensive.

    Here are some more resources for .htaccess. Remember - tread very carefully.

    http://perishablepress.com/press/2006/01/10/stupid-htaccess-tricks/

    http://zemalf.com/1076/blog-htaccess-rules/

    ... and more than you'll ever want / need to know about .htaccess, right from the source ...
    http://www.askapache.com/htaccess/htaccess.html

    To get an idea of what I'm talking about, check my site (http://www.CADbloke.com/) in Yslow (Firefox's Firebug plugin). Under the "components" tab note that most (hopefully all) of it is gzipped and expires in at least a few days time. Also have a look under the "statistics" tab & note how many requests are needed for a primed cache. If you have a look at the Net tab you can see what is actually being loaded. Try it by loading the page normally once of twice, then Ctrl-F5 to clear the cache and reload it. See how much was cached? That's what speeds page loads up and takes a huge load off your server.

    Mostly unrelated: Irfanview is a free image viewer that has a save-for-web plugin which is very effective and eminently tweakable.

    oh, btw - my site is a heavily butchered version of Hybrid News. Any feedback is more than welcome.

    Hope this helps.
    :)
    Ewen

  18. @Ewen

    Thanks for the in depth write up on .htaccess and for the links to various educational sources.

    Cheers.

    Jon

  19. I wrote this up plus a some more info & a methodology for setting up a test site (plus some plugins I use) at http://icanhazdot.net/2010/03/23/some-wordpress-stuff/

    If you see any problems with http://www.CADbloke.com/ please use the contact form on that site rather than hijacking this thread.

    cheers
    Ewen

  20. You must be a logged-in exclusive member to view this reply.

  21. Yslow is teh biz. Firebug and Yslow are brilliant ways to see exactly what your site is doing. Between the components tab on Yslow & the Net tab you'll have enough info to see what needs tweaking, cache-wise.

    My Pingdom response-times halved when I set up all the caching & expiry. That site is served from a $10/month shared host at ICDsoft. I'm in Australia so I really notice slow sites but I'm pleasantly surprised by how much difference local & server caching makes.

    I'm also pleasantly surprised at how well WP Super Cache plays with what are basically 3 themes - my hacked Hybrid News, wpTouch (iPhones) & mobile-edition (for Nokias, etc). It seems to cache pages by user-agent & do so quite well. I set my Super Cache expiry at a couple of days - my blog is not busy & probably never will be and it won't grow to billions of posts. Well, if it does I'll optimise it then.

    I came across your (and a few others) post on conditional loading of styles & scripts etc (I added links to them to the blog post at http://icanhazdot.net/2010/03/23/some-wordpress-stuff/). This would create a few more variations of minified CSS & JavaScript to be cached by local clients but would also take a load off visitors who never visit pages with a contact form or haven't left a comment or whatever else an unused plugin is waiting to not-do.

    I'm still thinking about how worthwhile that might be. Perhaps I'm better off controlling this by user-agent IDs to lighten the load for mobile browsers. I don't want to create too many variations of the locally-cached CSS & JavaScript since that would actually increase download times and use more bandwidth. Oh, the dilemma.

  22. You must be a logged-in exclusive member to view this reply.

  23. Yup, that all seems like sound advice to me.

    I saw your post about replacing CSS @imports with the compressed CSS from the file it was importing. That's my next (easy) boost. I'm pretty-much finished ruining my version of Hybrid News so I can now consolidate the mess I've made of the CSS without messing myself up.

    [edit] - inserted the imports into the Hybrid News Styles.css - too easy. wp-minify took care of the rest. [/edit]

    I like the way wp-minify groups and compressed CSS & Javascript. I think I'll exclude the special ones from minifcation so there is one constant (locally cached) minified file each for CSS & JavaScript for the whole site.

    Thanks again for your support & for Hybrid.

  24. How do you combine external CSS?

  25. You must be a logged-in exclusive member to view this reply.

  26. Is there any tutorial that you know of that shows how to add the CSS files?
    Thanks

  27. You must be a logged-in exclusive member to view this reply.

  28. tip: I commented & left the @import statement in to remind me of what is going on, especially when Hybrid gets updated because I'll have to go back and re-paste the new CSS.Have a look at the CSS on Justin's or my site to see exactly what we did. It is nothing more complicated than a simple cut & paste.

  29. I pasted the CSS and it made my website not load. So I had to replace the original @import. Thanks for the tip I'll give it another try.

  30. Just wanted to say thanks to CAD bloke for his post on expires headers and gzip, I copied and pasted the .htaccess file from this post http://www.samaxes.com/2009/01/more-on-compressing-and-caching-your-site-with-htaccess/ and knocked about 2.5 seconds off the serve time for my homepage. It also bumped me up a whole letter grade in YSlow, thanks!

Reply »

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Bliss Theme (253 posts)
  • Hybrid Theme (21,735 posts)
  • Options Theme (10,356 posts)
  • Structure Theme (2,747 posts)
  • Outline Theme (36 posts)
  • Visionary Theme (767 posts)
  • bbPress Themes (305 posts)
  • WordPress Plugins (2,045 posts)
  • General Discussion (5,276 posts)