Custom WordPress websites for scalability: the perfect plugin selection and tech stack.

WordPress is never just WordPress. The open-source nature of WordPress, along with its supreme flexibility and ability to customise as you need has seen it grow to be the world’s most popular CMS. The global adoption means that there’s a plugin out there for almost any function you can think of.
This is not always a good thing. There’s plenty of poorly developed or unsupported plugins out there, which can quickly equate to costly fixes, refactoring or rebuilding. Or in a worst-case scenario, a website that has to be turfed soon after build as it simply can’t be upgraded. Unfortunately this is a regular occurrence. Here at Mainstay we’ve had to rebuild many legacy sites handed to us by clients from former developers.

Performance, scalability, lowered risk

This article outlines our plugins of choice, and the wider tech-stack we use. As we build and support sites for scalability (and security and performance), we undertake many custom WordPress builds – and this is always our preference over a site using an off-the-shelf theme or template. And by custom, we mean working with a base theme to develop the user interface based on designs from scratch. It also means we aim to minimise the number of plugins we use down to a core selection.

There are some compelling reasons for custom WordPress builds:

  •  Purpose-built means reduced code, cleaner code which in turn means site performance.
  •  Less plugins means reduced code bloat – again performance and lowers risks of breakages in maintenance and updates.
  •  Less plugins means less maintenance, and fewer risk of vulnerabilities
  •  No need for attempting to retro-fit functionality to a templated theme (which never works well)
  •  Read-to-scale – purpose-built with a lean plugin and code base sets you up for scalability

In a nutshell, it’s about performance, scalability and lowering risk.

Let’s dive into our core WordPress “tech stack”, which comprises of a CSS framework, a PHP templating framework and plugins.

It’s helpful to think about the purpose of each of these first:

 

Development: Plugins:
1. Base theme 1. Content blocks
2. PHP templating 2. Firewall / security
3. CSS Framework 3. Monitoring
4. SEO
5. Site performance
6. Image compression
7. Forms
8. File management
9. Security
10. Search
11. PHP Templating
12. CSS Framework

    Minimum plugins

    As we have a “minimum plugin” ethos, we also advocate for integrating with dedicated 3rd party services, rather than loading up WordPress with plugins which are attempting to bring them into the WordPress house. Some examples include: your CRM (e.g. Hubspot or Salesforce), your email marketing client (e.g. Campaign Monitor), email notifications (e.g. Mailgun), site analytics (e.g. Google Analytics). We do also write scripts and mini plugins on a regular basis to fulfil site and business specific needs.

    And what makes a good plugin? It must be written well, supported, and widely adopted, and it strikes the balance of features & functionality vs need. It’s been well planned and built for purpose. Unnecessary features within the plugin equals unnecessary code, which means inefficiencies.

    This list excludes major plugins such as Woocommerce or Memberpress, as these are specifically for ecommerce or membership sites.

    So let’s jump in!

    Development

    Base theme: Lumberjack

    WordPress utilises “themes” which control the end output of your site appearance and functionality. Using a base theme means that much of the base functional heavy lifting has already been done, and you can style or change functionality based on your needs. Afterall, there’s no point developing from scratch if you can leverage pre-existing (quality) code. This is the rationale behind all programming frameworks.

    In most cases, we use Lumberjack. It’s built to a Model-View-Controller (MVC) standard, a best practice web development standard. Lumberjack means we avoid code re-use, it’s written in a consistent style and it’s easy to develop with. Lumberjack helps to manage dependencies, separates out the WordPress front and back ends (ensures iterations aren’t a mess) and provides better management for files, folders, post types and configuration.

    [H3] PHP Templating: Twig

    Twig is a PHP templating engine which plays in nicely with Lumberjack. The existence of Twig highlights one of WordPress’s shortcomings – the lack of a templating language. Coding straight into WordPress is not modular, which means it can be messy. Enter Twig. Twig compiles templates. And for developers, it provides a stack of features, tools and approaches which translates to lean, secure, efficient code.

    Twig is a PHP templating engine which plays in nicely with Lumberjack. The existence of Twig highlights one of WordPress’s shortcomings – the lack of a templating language. Coding straight into WordPress is not modular, which means it can be messy. Enter Twig. Twig compiles templates. And for developers, it provides a stack of features, tools and approaches which translates to lean, secure, efficient code.