Improved Performance, basics

In Webserver by MyrddinLeave a Comment

For a couple of months I have been moody about this site’s performance. This server serves only a couple of domains and this is by far the most visited of them – yes, really 😀

This server is a vServer from a mass hoster running on ancient hardware shared with other people and I assumed it was one reason aside a bloated WordPress install with loads of plugins that raised response times to an unendurable degree. We had like 5 seconds on a cached page before anything was even served.

Increasing memory for php, mysql, apache worked only to some point, but as soon I got visitors from mmo-champion, wow.com or had other popular posts this site broke down.

Time for Action

About 1 year ago a 3D model of my World of Warcraft Enhancement Shaman loaded on the front page, this took alot of time … and bandwidth … lots of http requests … css .. javascript … delay from outside servers, etc.

Once the 2.1 megabyte and 160 objects were loaded it looked amazing 😀 However the lack of widgets and other – tedious to customize – content made me want to rework the site with a nice, custom, self made theme.

Polish up your Site

This was a long process with a lot of trial and error. At first I massively reduced the images used by the template. A Game Blog doesn’t live from walls of text alone – the idea was to cut lower the amount of images but keeping an appealing look.

Images

Avoiding gradients in articles, buttons, backgrounds and glare effects reduce the docmument size significantly. Not using icons in front of headers, date, categories, tags help to reduce the amount of http requests. Also you can easily scale down the quality of an image. Most image processing software will provide a preview, including filesize, making it easy to choose size versus quality.

Header

Instead of slicing a header image into pieces and thus creating a lot of additional files I moved the whole sheet (content) down and placed the picture in the background. With a an added transparency effect this saves a lot of work effort. Pesonally I like the look a lot, even though addmitedly it is kind of big.

Compression

The HTML (or generated PhP code) , Javascript and CSS are plain text files. You can shrink these by removing comments and other formatting that that ease legibility. In adition you can instruct your server to send these files compressed, reducing their size even more.

In terms of pure bandwidth optimization this was even the biggest gain. The document size was was reduced from 1.7 mb to 1.1 mb.
If you have many features on your site, your theme/plugins may come with individual java script and css. It is a good idea to combine them into single files. The compression will become even more efficient. More about that later!

webmaster tools performance time

Plugins

Plugins play a huge role in WordPress success. It is amazing how a few simple clicks provide new functionality to your site and its use. WordPress provides a search function in the admin area and lets you add plugins on the fly.

On the other hand plugins are often overused. Even well documented functions that you can easy add manually are served by widgets and not all of them conserve your resources.

Removing plugins that serve the same purpose or overlap functionality are a great way to scale down the document size.

I used to have “Yet Another Related Posts Plugin” and “Search Engine Query in WordPress”. They provided similar results, lacked customization and were requesting active queries and thus server load.

Efficient Related Posts is my replacement for them. A plugin that shows related links at the end of a post to help the visitor find more interesting information on your site. ERP calculates related posts only once when a post is published instead of each time a client requests the information.

Bottom Line

Aforementioned suggestions help reduce a big chunk of the a website document size by a lot. the first move to optmize your website. After these steps I was at only 700 kb and 60 objects.

Shortly I’ll write a followup where I’ll elaborate in tech detail cache installation, server tuning and furhter opmtimization.

Leave a Comment