Static sites with Templer

I run a lot of personal and professional sites for my own activities, and until recently I’d used WordPress to manage the content on them. However, this felt a bit wasteful when in many cases there was no dynamic or user-generated content such as comments. As a result, I decided to have a go at changing them to static sites.

After browsing the options available on StaticGen, I eventually decided on Templer for a number of reasons, mainly: it’s written in Perl, there are Debian packages available and I know the developer. It allows you to create a basic site layout with a placeholder for the content, and then each page’s content is saved as a separate file.

The main benefits I’ve noticed from switching to static sites include:

Security: Whilst I do keep on top of security updates, it’s always possible that either a security bug won’t be reported or a fix will be released when I’m on holiday with limited network access. By removing WordPress altogether on several sites, I’ve reduced one potential attack vector on my server.

Time saving: WordPress updates are generally easy to apply, and I can usually update a single site in 5-10 minutes. However, once you have 10+ sites, upgrading becomes a bit of a pain, so keeping the numbers down makes this process manageable (I’m aware of the network option to run multiple sites from one installation, but the migration process seems quite lengthy and error-prone – I may give it a try one day though).

Speed: No matter how many performance enhancements are applied to WordPress, it is unlikely to be as quick as serving up static files. My sites run on a virtual machine with limited memory, so speed and resource use are important considerations.

Themes: Whilst WordPress does support themes, creating one from scratch isn’t particularly easy as you have to include all the relevant WordPress components to make it display correctly. Furthermore, WordPress themes embed PHP within the code, which is an unforgivable sin nowadays. With pure HTML and CSS, I can quickly get the results I want without having to worry about how WordPress will process the file.

Version control: Now that the sites consist of simple text files, I can place them under version control. For an example of this, see the geekwalks.co.uk repository on my GitHub account.

I don’t have anything against WordPress – it’s still my default option for sites which have dynamic content, including this one. I have formed the opinion though that it is overkill for static sites run by technical people (I still use it for static but regularly updated sites run by non-technical people).

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.