Welcome to the second installment of my Wonderful WordPress Wednesday series!
Last week we looked at two simple steps you could take to improve the efficiency of your WordPress blog. It’s already working hard to present your priceless thoughts and opinions to your readers, so we might as well do what we can to make its job a little bit easier. This week we’re going to continue on that same train of thought.
If you’re like me, you don’t think about your CSS stylesheet very often. You probably downloaded a free WordPress theme from somewhere, added it to your blog, and then never really thought about it. Perhaps you’ve added a few things to it or modified a color selection or two. Overall, however, it’s not really a part of your blog that receives much attention from you, the blog author. But did you realize that the stylesheet is loaded with every single page? Although I was aware of this, I never really gave it much thought. Until, that is, I came across a post on gHacks.net titled Optimize WordPress loading times. Martin used the Free Website Performance Tool and Web Page Speed Analysis over at WebSiteOptimization.com to run his tests and I recommend y’all do the same.
Martin shares the results of his actual experiments in reducing the load time for his blog and found that simply compressing his CSS style sheet with Jeff Minard’s css-compress plugin not only reduced the file size, but also sped up his page downloads. According to the plugin’s homepage-
Automatically removes comments, new lines, tabs, and gzip compresses (GZIP) any CSS file called with “<?php bloginfo(‘stylesheet_url’); ?>” Just activating the plugin with the default Kubrick theme will reduce the CSS file from 8k to 1.7k.
The css-compress plug-in is a simple install it, activate and forget it tool (my favorite type!) and seems to have zero visible effect on the appearance of any of my blogs, while still increasing their load times and saving me a bit of bandwidth. In other words it’s a win-win. There is one caveat, however, (again, according to the plug-in’s page)-
It has been noted though, relatively referenced urls inside the style sheet may be problematic. If nedd be, the plugin will attempt to re-write all of the url() paths to a fully qualified path – this may not work right. If things break, pleasewith the address of the blog and contact me via AIM chuyskywlk so that I can fix this.
Note: In addition to compressing and optimizing your CSS style sheet, you should do the same thing to the PHP code that powers most of your WordPress blog. Unfortunately, I have yet to find a simple and safe way to do so automatically. If you know of one, please let me know via a comment!
Speaking of compressing and optimizing… When is the last time you optimized your WordPress database? If that phrase means nothing to you, don’t feel bad. It didn’t mean anything to me either when I came across it over at J.T. Pratt’s Blogging Mistakes (currently my favorite blog about blogging). You can follow the link to his excellent explanatory article on why you should optimize your WordPress database, so I’ll just cut to the chase. Your database “reuses” old space in the same way that your hard drive does. Sometimes this leads to a sort of “fragmentation” of data and empty, unusable space. Optimizing your database is just like defragmenting your hard drive – you won’t know how much better your performance will be until you try it.
Luckily, Lester ‘GaMerZ’ Chan (one of the most prolific authors of must have WordPress plugins) has created the ultimate WordPress Database Manager plugin which (according to his site)-
Manages your WordPress database. Allows you to optimize database, repair database, backup database, restore database, delete backup database , drop/empty tables and run selected queries. Supports automatic scheduling of backing up and optimizing of database.
In other words, it’s an all-around health maintenance supplier for your WordPress database. Although not quite an “activate and forget” plugin, it’s pretty darn close, providing one-click optimization of your database as well as the ability to schedule any and all optimization and backup functions. An optimized database means WordPress doesn’t have to work as hard to serve your site to visitors.
That’s it for this second installment of the Wonderful WordPress Wednesday series. Next week we’ll look at the first plugins you should install in your blog even before you write your first post!
The Complete Wonderful WordPress Wednesdays Series-
- Introducing Wonderful WordPress Wednesdays!
- Lighten The Load Of Your WordPress Blog – Part One
- Lighten The Load Of Your WordPress Blog – Part Two
- Starting A Blog? Install These 5 WordPress Plugins First!
- Popularity Protection For Your WordPress Blog
- Can Your WordPress Blog See The Future? Mine Can!
- Moving Your WordPress Blog To A New Web Server In 10 Easy Steps
- Pretty Blog Pictures Thanks To CSS!
- Falling In Love All Over Again – WordPress 2.7
- Stop Letting Sponsors Determine Your Blog Layout!
- Importing Large MySQL Databases With BigDump
- Using A Default Rating With WP-PostRatings Plugin
- Victory Over The Comment Spammers