High Availability WordPress: 12 key aspects

Key aspects to achieve WordPress High Availability

This guide on how to achieve a High Availability WordPress website addresses the main aspects to consider to ensure high availability, performance and resilience for a WordPress corporate website or WooCommerce-based eCommerce.

Downtime cannot only have a negative impact on business revenues but can also seriously damage your brand reputation. It is not to be neglected, so let’s delve into the details.

Basic elements in a High Availability WordPress site

The following guide collects the key elements of a WordPress High Availability Setup, starting from the bottom up. As experts in IT infrastructure solutions, we are convinced High Availability starts at the infrastructure level.

High Availability Infrastructure

As a mission-critical and strategic technological partner, your cloud hosting provider is a great ally to achieve your goals. Therefore, make sure you choose a reliable provider that helps you deploy a High Availability infrastructure that can keep running under any circumstances. At Stackscale, we recommend relying on a private cloud infrastructure for achieving High Availability, redundancy and security. But there are numerous options in the market that adapt to each project’s needs.

Storage

As part of the infrastructure, a HA cluster should also include the necessary storage systems. We recommend centralized network storage volumes in different redundant arrays, since they are ideal for diverse types of files. Additionally, businesses can achieve real high availability over data by maintaining two volumes in different data centers to keep synchronous copies of data, as well as a cluster between two data centers in the database.

Bandwidth

Guaranteeing sufficient bandwidth, that adapts to the project’s needs at all times, is also important in order to be able to stand traffic spikes without downtime. As well as relying on an advanced communications network, with the necessary security measures to support great amounts of traffic and even DDoS attacks. Of course, as we mention later on, this can also be reinforced by a CDN service.

Load Balancing

Load balancing is essential as well. In this regard, we highlight HAProxy as an open source load balancing solution that provides High Availability load balancers for normal and secure SSL web servers. This application has an outstanding reputation among companies and the system administrators’ community. It is able to manage millions of requests for high-traffic projects and many big Internet projects use it, for instance: GitHub, Stack Overflow, Reddit, Tumblr and Twitter.

Nevertheless, there are many other virtual or hardware balancing solutions such as F5 or similar ones.

Caching mechanisms

Implementing caching mechanisms is also advisable to reduce the load on web servers and avoid overspend. In terms of caching, Varnish Cache is probably the best solution to cache and accelerate web pages. Some projects even use it as a load balancer.

Varnish Cache can be installed on any web server and be set up to store a copy of the requested pages in the server cache. By doing so, content can be served faster and more efficiently. It is used by many high-traffic websites, such as The New York Times, The Guardian or Corriere della Sera; as well as social media and content platforms such as Wikipedia, Facebook or Vimeo.

Additionally, Redis cache is also useful to improve session cache, among other aspects.

Content Delivery Network

A CDN solution can also be used to cache content and serve it to users from closer locations. Content Delivery Networks help reduce the amount of data the source server must provide to end users. Thus also contributing to cutting down bandwidth usage and costs.

Furthermore, a CDN can be a particularly useful tool if the project receives traffic from multiple parts of the world.

NGINX Web Servers + PHP-FPM

NGINX is a very light high-performance web server. Although NGINX is open source, under BSD license, there is also a commercial version known as NGINX Plus. A long list of companies and websites use this server —from WordPress to other well-known companies such as Facebook, Netflix, GitHub and SourceForge. Besides, this web server can be completed with the PHP-FPM module, which is a powerful alternative to PHP FastCGI and includes special features designed for high-traffic websites.

Naturally, there are also other web servers suitable for WordPress solutions such as Apache HTTP or LiteSpeed Web Server. The best solution will depend on each particular project.

MySQL cluster

MySQL is the most popular open source database in the market. It has become really popular thanks to its proven performance, reliability and ease of use. Millions of websites use this database; among them, big platforms such as Twitter, Youtube or Facebook. MariaDB and Percona MySQL are some of its alternatives. 

By deploying a MySQL or Percona cluster, you will be able to ensure data High Availability; in addition to getting a higher performance and 99,999% availability. A distributed, multi-tenant and without points of error architecture with MySQL cluster will provide you the necessary scalability for big data processing needs. Additionally, relying on a geographical distribution solution also allows dividing a cluster among several data centers, with latencies below 1 ms, to improve platform HA and resilience.

At this point, it is also important to have a good database and system administration team. They will be responsible for developing the procedures to make it work during the most critical scenarios and to enable it to grow whenever necessary.

Infrastructure for development and deployment

If possible, it is recommended to adopt GIT deployments or similar solutions, instead of FTP. Moreover, let’s not overlook the importance of having a development environment, which serves as a simplified copy of the real production environment for deploying and testing new functionalities.

Backups and redundancy

Defining a complete backups and snapshots policy is vital in order to ensure availability and business continuity. At Stackscale, custom backup schedules are available on request, in addition to the backups and snapshots included by default in network storage systems. Besides, we recommend keeping a replica in a geographically distant data center for further redundancy.

Geo-redundancy is another mechanism to achieve HA. By replicating data and IT infrastructure in multiple remote data centers, businesses can reinforce data protection and minimize downtime.

Security

It goes without saying that security must be a top priority for any project nowadays. Defining a strong security and Anti-DDoS policy is key to be prepared to mitigate a potential attack in the future. It can also be completed with CDN and WAF solutions.

Closely related to security, 24/7 monitoring and system administration is definitely essential as well.

Secure access to the infrastructure management dashboard

Last but not least, ensuring a secure access to your WordPress administration dashboard, as well as to any other management dashboard, is indispensable. You may or may not rename your WordPress’ “wp-admin” directory, but it is important you protect its access by using a password for the web server. In addition to the default user and password protection.

We always recommend protecting all management elements using a VPN to ensure encrypted and secure connections.

What should a HA WordPress Cluster include?

To sum up, a High Availability WordPress Cluster should at least include:

  • A HA bare-metal or cloud infrastructure with at least 2 computing nodes in two different data centers, with low latency.
  • Storage volumes, with data replication in two data centers.
  • Sufficient bandwidth.
  • Load balancing.
  • Cache mechanisms.
  • Web server.
  • Database.
  • Backups and redundancy.
  • 24/7 monitoring and system administration.

WordPress High Availability in a private cloud environment

When setting up a redundant and High Availability infrastructure, it is important to think about the evolution and needs of your future platform. If you consider your WordPress site will have to support thousands or even millions of daily visits, the infrastructure is essential and must be ready. Here is an example of High Availability private cloud infrastructure deployed in two different data centers.

Example of High Availability private cloud infrastructure deployed in two different data centers

In the example above, we suggest the deployment of 2 physical private cloud nodes, in 2 different data centers, in order to achieve real High Availability while benefiting from the advantages of having two physical locations. This example infrastructure located in two of our data centers in Madrid runs as a single one and also includes several centralized network storage systems in redundant arrays.

Nevertheless, from our experience, every project should be evaluated in order to build an infrastructure adapted to its real needs. We work in different types of projects and sectors, and every project is different and unique. So, please do not hesitate to contact us if you need help defining a High Availability infrastructure for your project.

Share it on Social Media!

Advanced cloud for WordPress

Boost performance and grow without limits with a custom-made High Availability WordPress hosting solution.

DISCOVER MORE