WordPress 1 Minute Wonder – Quick Performance Boosts

WordPress One Minute Wonder

This latest WordPress 1 Minute Wonder installation covers a couple of quick alternative steps that can be taken to dramatically increase your site performance… and yes I’ll be honest and say that actually to cover all 3 steps here it takes more like 10 minutes.

In the below investigation I based “performance” on Google’s PageSpeed rating and Yahoo’s YSlow and this was run against a newly launched online craft store site called Designs and Such.

Step 1 – Optimise Images

Using the PageSpeed tool (in Chrome) it was possible to  see that I had several un-optimised images on my site. I processed these with the free optipng tool and instantly saw an increase in 6 PageSpeed points and  2 YSlow points. Not bad for something which anyone can do.

Step 2 – W3-Total-Cache Plugin

Now there is some stigma around having lots of plugins on your WordPress site and the detrimental affect it can have on performance… now whether you back this line of thought or not* sometimes plugins can really benefit your site in this context. Now please be sure to backup your DB (or entire site) before using any plugins which might modify you’re .htaccess and potentially other files in your installation.

For my investigation I installed the W3-Total-Cache plugin and configured it just to cache and minify my HTML, JS and CSS. The results were staggering… I saw an overall increase of 11 Google PageSpeeed points and 12 YSlow points

Step 3 – .htaccess Tweaks

Another step, this time plugin-free, should immediately give some good results. Simply by adding the following lines to one of my site’s .htaccess file I saw a further 4 point increase in my PageSpeed score and a 1 point increase in Yahoo’s YSLow rating.

The following lines do 2 things, add expire headers to static files such as CSS, javascript and images and also removing ETags. Of course please backup your .htaccess before doing any of this.

This is defining a 1 month expiry for all content covered by the files types listed above. Note if you do this there’ll be implications if you want to modify any of the files, like CSS, and have the changes to affect immediately.

This technique (and more info on it) was found over at Tips & Tricks HQ

The overall results

So in total by carrying out the above steps I saw the following performance increase. Of course the results will vary site by site but I believe that with Search Engines using site performance as a factor when ranking your site that 10 minutes spent here will be of value.

Google PageSpeed Increase = 21

Yahoo YSlow Increase = 15

[jbox color=”blue” vgradient=”#fdfeff|#bae3ff” title=”Found this useful?”]If you’ve used this technique on your site for performance reasons and have some results then please leave them in the comments.[/jbox]

* When speaking to @westi at WordCamp UK (or WordCamp Manchester) in 2010 he said that putting code in plugins rather than the core should result in no performance hit… of course it depends on the quality of code

My WordCamp UK 2011 Review

So last weekend (16-17 July 2011) I upped and offed to my 2nd WordCamp. The previous one was in Manchester (UK) in 2010 and I had an absolute blast… so much so that there was no way I was going to miss out on some of the key things that a WordCamp has to offer;

  • Meeting new folk who love WordPress (and beer)
  • Re-acquainting myself with the lovely peeps I met last year
  • The opportunity to learn some things about WordPress
  • A stonkingly well designed T-Shirt!
Chatting at WordCamp UK 2011
Happy Campers

This years WordPress followed a familiar “3 track” structure which was semi-logically split in terms of the talks and discussions that were held in each. Being a developer of WordPress themes and plugins I had planned to mostly stay on the “developer” track but started my Saturday off listening to a panel chat about “WordPress in the Enterprise”. This was an interesting opportunity to hear about issues that I had never been exposed to before and was glad to have listened… even if it turned into a “how can WordPress play nicely with a Microsoft core IT setup” stalemate.

Next up I listened to Rachel McCollin chat about “WordPress and Mobile”. She covered the numerous ways in which devs and users can get a more optimal experience on mobile devices. I was particularly thrilled to have my Responsive TwentyTen plugin mentioned. This session also gave rise to some very helpful discussions from the audience on their experience and approaches to dealing with mobiles. In my personal opinion I think that actually all approaches are currently flawed… it seems that users and the device market are all running off at lightning speed and it’s leaving web designers and developers a little flat footed in truly understanding the ins and outs of it all.

StinkyInk WordCamp UK Swag
StinkyInk WordCamp UK Swag

I then jumped back to the “general” track to hear Nick Garner talk about advanced SEO. This was a real eye-opener it terms of me realising that my knowledge is very shallow compared to someone of Nick’s calibre. His talk covered some extraordinarily useful WordPress plugins which I will certainly be looking into.

Another session I took in on the first day was Noel Tock’s thoughts on “running your own theme marketplace”. He was a very engaging speaker and presented some very thought provoking lessons from his time at ThemeForce. Oh, for info on the slides etc from WordCampUK 2011 head on over to the wiki.

It was during this session that I actually missed my second fifteen seconds of fame from WordCamp 2011 as over in the main room Kimb Jones‘ popular “WOW plugins” session included my Widgets on Pages plugin. I was honoured to have this mentioned along with plugins some as Gravity Forms and the like… though I ‘spose I should own up and say that I’d been pestering Kimb all year to get it included!

The Saturday social was another great chance to chat to folk I hadn’t yet caught up with and I was lucky enough to be sat at the same table as Scott Cariss who turns about to be keen on security and told me of File Monitor Plus which is one of his plugins… I suggest that one and all install this right now!

The social also gave me the chance to retain my title of “last man standing” which I earned the previous year… though to be honest the competition was light and with the help of the lovely WP Sites folk I had the title (or at least a 1/3 of it) in my pocket for another year.

The Sunday kicked off despite my tiredness inflicted by the night before at some place called Fuzzy Ducks and I dived straight into a session on setting up and running local WordPress meetups. I soon discovered that one was already running in London and I hope to be going along to their meetings in the future. If you’re looking for local WordPress meetups in the UK then head on over to the WordCampUK wiki.

The day then took a more technical spin with Rob O’Rourke showing off how you can pretty much bring all content needed in a site into the welcoming arms of WordPress’ CMS capabilities. It was in this talk that I learnt of Custom Nav Walkers… something incredibly powerful that I think would benefit most theme developers doing bespoke work.

Dave Coveney was up next in the main room talking about some of WordPress designers and developers biggest mistakes… along with some sensible talk and humour this got us all thinking about how we could be doing things better.

The last core session was that where the “site doctors” give a lending hand to the (very brave) few who have queries on topics spanning everything to do with WordPress and websites in general. This is one of the most valuable sessions I believe as the floor is pretty much opened up to everyone to give their tupence on how to improve SEO, better help clients, increase security and pretty much anything else you could imagine.

And there you have it… my views (or at least the cutdown version) of WordCamp UK 2011. Big thanks should go to the WordCamp UK core team, the speakers and sponsors and all who helped put such an engaging and enjoyable weekend together.

WordPress Upgrade Error – Incompatible Archive Solution

Just a quick post to highlight the solution to a recent WordPress issue I had when trying to upgrade WordPress release using the “Upgrade Automatically” option. The error I was seeing was:

Incompatible Archive.: PCLZIP_ERR_BAD_FORMAT (-10) : Unable to find End of Central Dir Record signature

Even for someone who may be technically minded this is a little unhelpful… but thankfully the solution (in my case at least) was to free up some space on my hosting account. So it seems that the cause of the issue (or at least one of the causes) is that there was not enough space available for the automatic WordPress upgrade to take place.

WordPress 1 Minute Wonder – Styling Widgets on Pages Horizontally

WordPress One Minute Wonder

In this edition of WordPress 1 Minute Wonders I will answer a question which I frequently get emailed about… and that is how to style widgets next to each other when using my Widgets on Pages WordPress plugin.

In this post I have 3 widgets in one of the sidebars created by the plugin. I have named the sidebar horiz.

To get the Widgets to display as they do above there was some extra CSS that I had to add to my theme’s style.css file to get them to display like this… here it is.

I have put a fair amount of styling in there to make them look a bit more appealing but essentially the important bit that makes the widgets sit next to each other can be done with just the following;

In the first section we style the whole sidebar (you would replace .horiz with whatever you had called your sidebar), making sure that the content overflow is set to auto. This makes sure that any content following the sidebar does not also creep up alongside the widgets.

The second section styles the widgets (all three in this case). The key part here is the float:left; which makes them site alongside each other.

[jbox color=”blue” vgradient=”#fdfeff|#bae3ff” title=”Found this useful?”]If you’ve used this tip why not subscribe to my feed or check out the first item in the WordPress 1 Minute Wonder series?[/jbox]

WordPress 1 Minute Wonder – Adding Gravatar Hovercards

WordPress Gravatar Hovercard

WordPress One Minute Wonder

As a sequal to the debut entry of the “WordPress 1 Minute Wonder” series which talked about styling author comments differently to other comments this post extends the usefulness of your comments by adding Gravatar Hovercards to you site/blog. This posts presumes that you know what Gravtars are (if not check them out).

Again, in true WordPress 1 Minute Wonder fashion this is a dead simple thing to enable and involves nothing more than copy and paste and (s)FTP access to your site. In fact before I show you the steps I should credit the guys at WebBlogToolsCollection for this… in this case I simply a messenger.

So to get this working simply copy and paste the following code into your theme’s function.php file (create one if it doesn’t exist).

This should give your comments’ avatars a nice hovercard affect if you hover over them.

WordPress Gravatar Hovercard

It’s that simple and useful… brilliant.

To get the most out of this feature (on your site and on others that you comment on) make sure you update the info on your Gravatar profile.

[jbox color=”blue” vgradient=”#fdfeff|#bae3ff” title=”Found this useful?”]If you’ve used this tip and now have Gravatar hovercards working on your WordPress powered website or blog why not subscribe to my feed or check out the first item in the WordPress 1 Minute Wonder series?[/jbox]

WordPress 1 Minute Wonder – Styling Author Comments

Styled Author Comment

This is the first in the series of my 1 Minute Wonder series for WordPress where I’ll be showing simple and quick tricks for WordPress to add a little extra to your blog or WordPress powered website. And in this series debut I’ll be showing you how to add extra styling to the comments made by the post author.

So a quick caveat… this trick depends on your theme’s implementation… hopefully it’s been created with all the correct semantic markup needed. If you find this doesn’t work then to resolve the issue may take slightly longer than the one minute.

So here we go, all you really need to do is add the following to your current theme’s style.css file (usually located in ~/wp-content/themes/<theme_name>/ directory);

What we’ve done here is added extra styling to give the author’s comments a background specific background colour with a nice rounded border and a subtle box shadow. The rounding of the corners and the shadow are created using CSS3 so may not show on older browsers.

Styled Author Comment
Styled Author Comment

This styling can be seen on this very blog over at this post on the Responsive TwentyTen child theme for WordPress. Of course the comment can be styled in any manner of ways depending on the CSS you apply.

[jbox color=”blue” vgradient=”#fdfeff|#bae3ff” title=”Found this useful?”]If you’ve used this technique on your site for styling comments then please leave me a comment below with a link so I can take a peak.[/jbox]

5 Tricks to Spice up your WordPress Blog

By adding a few lines of code or installing a plugin or two you can add some extra spice to your WordPress blog (or other WordPress powered site) and at the same time  bring a lot more value to your readers.

Wordpress LogoOf course these tips are dependant on your ability to install plugins/widgets etc and some are also only applicable to themes with certain functionality, but you should see at least one tip here that you can apply nice and easily.

1) Enhance your Sidebar

If your blog has a sidebar (and let’s face it most blogging themes proide at least one) then this gives you prime screen real estate to give extra information to your readers about you and your blog or subject matter. There are many, many plugins out there which cater for all sorts of users and content type.

As you can see on my sidebar I provide a list of events that I’m attending, giving hopefully some more context to the things that I’m interested in. This is powered by the My Lanyrd Widget and as such pulls information from my Lanyrd account.

As I’ve said, there are many sidebar widgets available… so what are you waiting for, go get some!

2) Put Widgets in your Posts

Following on from Step 1 is the perfect tip for adding extra “dynamic” content to otherwise fairly static blog posts or pages… Add your widgets to them!

All you need to do is install the Widgets on Pages plugin and then add the widgets that you want to the newly created sidebars and then place a simple shortcode in your post content and your widgets will be displayed inline. For example I’m displaying my “posts calandar” right here

3) Shortcodes

Shortcodes can be extremely powerful and can provide you with a quick way to add extra content/design to your posts and pages. There are many “shortcode” plugins available and a lot can be downloaded for free from WordPress.org. A simple example is the J Shortcodes plugin which among other things enables you to quickly add styled areas to your posts.

[jbox]This text is in a nice styled box using the J Shortcodes plugin[/jbox]

4) Customise your Feed

A key way to give your readers more is to improve the default RSS feed that goes out to them. This is done by adding some short code to the functions.php file (located in your WordPress theme’s directory). I add the featured image to my articles as well as a short finishing line to thanks the reader for the time and to send them to my blog.

The options here are really only limited by your imagination, you could add links to related posts for example.

The code to add a nice sign off is as follows;

5) Make it Device Ready

With every day that goes by there are more and more Internet-ready devices on the market and these come in all sorts of sizes. And it’s with this in mind that having your blog ready to display optimally on this wide range of fixed and mobile devices you should really start thinking about making your blog “responsive”… or at least mobile phone friendly.

There are various free and paid for ways of getting your site to work well for readers who aren’t just using their PC at home or work, but I’m gonna focus on just 2 here.

Make you Site Responsive

This is the best place for your site to be… it means that your site is future-prrof (ish) for devices of all various sizes to access it. Implementing this generally means having to get a theme tweaked to utilise media queries and various other CSS techniques… but I have a cunning plan for those using the default TwentyTen WordPress theme… the Responsive TwentyTen plugin. This plugin (free) instantly turns your site into a responsive one and means that as the browser window size changes your site re-formats itself to display in the most optimal fashion. Don’t believe me? Just try it on this site.

WordPress Mobile Plugins

There are several plugin available which will server up optimised content for mobiles. A decent review of different plugins and approaches can be seen over at WP Candy.

[jbox color=”blue” vgradient=”#fdfeff|#bae3ff” title=”Get Started”]So what are you waiting for?

Get downloading the great Widgets on Pages plugin and check out check out how to make your site look good on mobiles.[/jbox]

How to display Widgets inside posts and pages

I was faced the need to be able to place extra manageable content inside a wordpress page’s core content… and without an existing plugin available to do this I thought I’d write one of my own.

The output was the Widgets on Pages wordpress plugin which is at time of writing at version 0.0.4. The plugin basically allows the author to add a shortcode to their wordpress page or post which will then add the content of a predefined Widget area (or sidebar) at that point in the post/page

Widgets on Pages Options

The plugin approach allows the user to add a lot of extra control to their wordpress sites without the need for any coding or markup skills (PHP, MySQL, HTML etc).

UPDATE: In version 0.0.4 you are able to define an unlimited number of separate sidebars and call these all separately within the wordpress content.

My 1st Plugin is Released


As part of my work for Gingerbread Design I have just released my first WordPress plugin into the wild. The plugin provides bulk functionality to help manage eCommerce web sites/stores. Details of the plugin can be found on the official plugin homepage and of course can be downloaded from the WordPress.org plugin directory.

Please, please try this out if you use the WP e-Commerce plugin in your own web site/store and let me know which other bulk features may be of interest and most use to you.