HomeAbout miserere.orgThe Technology Behind miserere.org

The Technology Behind miserere.org

miserere.org is built on WordPress. WordPress was chosen for several reasons – primarily to explore how to build a web application by extending WordPress, but also as I already had plenty of experience with the platform. I investigated a variety of database application builders, but none allowed the data to be presented in the format I wanted without considerable additional effort, whereas WordPress provided this “almost out of the box”. WordPress is developed using PHP which felt well within my grasp as a development language.

WordPress has been extended by a few carefully selected third-party plugins and my own PHP code, originally developed and tested using Code Snippets before being converted to simple plugins. The most significant extension is the use of a Custom Post Type to handle the discography data, with an associated Taxonomy, and various Custom Fields. Whilst there are many plugins that simplify the creation of these elements, none of those I evaluated met the targets I set in terms of efficiency or ease of use, and they were costly. Instead, I wanted to get under the hood of the WordPress platform and avoid dependencies on third-party software that would reduce flexibility in the future.

Theme Support

GeneratePress Premium by Tom Usborne is used as the parent theme. GeneratePress is lightweight, efficient, simple to use and well supported. It is not overloaded with additional functionality, which was ideal, although some might expect to find capabilities that are present in other commercial themes, such as SEO (search engine optimisation). Technical support and advice is available via a forum that provides helpful and timely responses, including for development issues or “how-to” questions. GeneratePress was extended with the Miserere child theme to allow customisations to be made and preserved when the core theme is updated. Beyond use of the standard options within the Premium version of the theme, the child theme includes modifications to the standard page templates, and additional CSS (cascading style sheets) to adjust the presentation.

Third-party Plugins & Blocks

I wanted to minimise use of 3rd-party plugins and to stay as close to core WordPress functionality as possible. Until very recently, no additional “blocks” were employed alongside what shipped with WordPress Core, but this changed when Tom Usborne released GenerateBlocks 1.50 which contains an excellent QueryLoop capability which will allow for all sorts of new ways to present the Discography data. Within a few hours this enabled me to retire some older code and replace it with something much more capable. Given GenerateBlocks, like GeneratePress, is very lightweight, this supported the objective to reduce complexity and dependencies.

The following third-party plugins are used:

  • Akismet Anti-Spam – to protect Contact Form 7 submissions. Commercial.
  • Contact Form 7 and its message store Flamingo – standard and simple. Free.
  • GeneratePress Premium – the plugin that enables the pro features of the GeneratePress theme. Commercial.
  • GenerateBlocks Pro – a truly lightweight set of blocks – including the excellent QueryLoop. Commercial.
  • Lightbox for Gallery & Image Block – a new and efficient lightbox plugin. Free.
  • Plausible Analytics – low cost analytics in use across a number of projects. Simple, and requires no cookies, so privacy-friendly. Commercial.
  • Posts Table Pro – a simple and highly effective plugin designed to get data and present it in tables. Commercial.
  • Relevanssi Premium – relevance based search engine with support for searching the additional data in the discography. Commercial.
  • WP-PageNavi – Adds a more advanced page to page navigation than that supplied by the theme. Free.

Custom-developed Plugins

One of the drivers for this project was the opportunity to learn more about WordPress and to develop some coding skills. It helped having a background in how software development works, though I’m not a developer myself. I started with a lot of cut and paste examples, that were then tested, modified, tested again and adapted before being included. After a while I was starting to know what approaches to take from scratch, and occasionally getting things right first time.

The code behind miserere.org is structured using the following plugins:

  • Archive Titles – Customises presentation of archive titles for custom taxonomies
  • Breadcrumbs – Provides sitewide breadcrumbs, handles multipage posts, and custom taxonomies
  • Configuration – a variety of configuration items that aren’t appropriate to include in other plugins
  • Discography – creates the custom post type, taxonomy and custom fields, adjusts sort order
  • Extend Posts Table – adds support for custom fields as required by certain tables
  • Icons – generates shortcodes for the icons used on the site (mostly WordPress DashIcons)
  • Meta – automatically generates the archive and single view presentation of the discography entries
  • Meta Shortcodes – automatically generates structured data in the body of each discography entry which can be extended manually through the editor.
  • SEO – Adds simple SEO Meta Title based on a custom meta-title field, or the standard title. Adds meta-description based on the excerpt.

In future I will publish the code with credits where appropriate, along with documented examples.

Hosting and Infrastructure

I use a couple of test platforms which are kept synchronised with the main site by the transfer of files and MySQL backups. Daily backups are taken using the automated SnapShot backup capability provided by the hoster. Manual SnapShots are executed before significant changes, and manual backups are taken regularly and stored in a few locations. Hosting is provided by 20i.com on their managed VPS platform.