Part 3: Growing & Making Money
Keep your site fast — both humans and search engines don’t like waiting
3.1.1 Minimise plugins
Throughout this article we’ve recommended lots of plugins. They’re all valuable and can add to your site. However, don’t go over the top. Each and every plugin that changes your site appearance adds processing and transfer overheads. Plugins that are for management use only (e.g. backup plugins) are of much less issue. Wherever possible, use a theme which includes the functionality, or implement solutions without plugins, for example, instead of using the “external links” plugin to apply style your external links, simply implement this styling yourself with a bit of CSS and an image or 2. Try to keep a sensible balance — don’t remove valuable plugins just to keep the number of plugins low, but don’t keep ones you don’t really need either.
3.1.2 Remove unused plugins
This is simple — if you’re not using a plugin then don’t waste hosting space on them. Unless you think you might want to reactivate a plugin in the future don’t just deactivate, but delete. Removing unneeded plugins also keeps your wordpress management page less cluttered.
3.1.3 Replace plugins
Some plugins are very large and have a lot of features, but you might only use one feature of such a huge plugin. Consider manually adding the code for that feature and ditching the overhead of the whole plugin (see section 3.1.1) or consider finding an alternative plugin which offers just the features that you need.
3.1.4 Cache & Minify
Your hosting will almost certainly be running on either the Microsoft of the Apache web server. Our host uses Apache, which supports compression of any data it sends, if you choose to enable it. The Microsoft web server also supports compression which can simply be turned on or off. All modern web browsers support compression. There are 2 ways of compression data with Apache, and you may only want to compress certain files. Here at DIYMH we compress all our text based files using apache’s mod_deflate. This reduces our front page load size from approx 100k to approx 20k! Depending on your web host you may only be able to enable some types of compression. BetterExplained have an excellent guide to compression which we recommend you read.
3.1.5 Keep scripts in files
3.1.6 Use CSS Sprites
CSS sprites are an excellent way to reduce the number of HTTP requests sent back and forth between the readers browser and your web server. Instead of having 30 individual images, which all have to be requested separately, you can reduce the number of requests to the server by having all of images in a single file. Use CSS to insert the correct part of the image each time you want to use it. Another benefit is that 1 large image file is often smaller than several small images combined. There is more information at CSSTricks, W3Schools and SmashingMagasine
3.1.7 Compress images
By default lots of images can be losslessly compressed better than wordpress does by default. This will save on image transfer times. There are plugins that will do this for you, e.g. WP Smush.it. If you’re using PNGs (as recommended in section 2.1.2) then there are several ways to improve efficiency. To maximise PNG efficiency images can be compressed with PNGGauntlet, however this must be done after upload. If the image doesn’t contain many shades or colours then save it as a 256-colour image — this will reduce the file-size significantly, but again, this efficiency should be sought after upload. The reason for not compressing or reducing the colour depth of images before upload is that the PHP resize function will not create good quality resized images if they are already compressed. So, upload your images, let wordpress generated the resized images, download them with an FTP program, compress them with PNGGauntlet, and then reupload and over-write the originals. WP Smush.it will get you 90% of the way and is much more convenient. We always recompress our PNGs locally with PNGGauntlet, but you may not want the hassle — the choice is yours.
3.1.8 Set expiration of static resources
Browsers cache all the content that they load. To avoid images and other static resources being reloaded on every page load you can specify an expiry time which instructs the browser to use its cached copy until the expiry date passes, when it will fetch a fresh copy. Anything that doesn’t change very often should have an expiry set. At DIYMH we do this via W3 Total Cache.
3.1.9 Use relative links
If you insert any links to anything else on your site always use a relative path, rather than a full path. This saves a tiny bit of page size, but more importantly, it means you won’t have to change them if you ever change your domain name.
3.1.10 Remove old revisions
By default wordpress retains a copy of all previous revisions of every article on your site. This is overkill in our view. The easiest way to manage this is to use a plugin, e.g. revision control, which will automatically cull older revisions based on your settings. This will keep your database size down and the speed of your site will benefit.
3.1.11 Check your page speed
Whilst google page speed (see section 1.3.2) is a good place to start, we recommend using a wide range of tools to check you’ve optimised your site fully.
Think we've missed something? Let us know by commenting below. If you would like to subscribe please use the subscribe link on the menu at the top right. You can also share this with your friends by using the social links below. Cheers.