View Categories

WP Cloud Platform Overview

3 min read

We, CloudyShaper, partner with WP Cloud, an Automattic venture, to provide world-class WordPress Cloud Hosting.

WP Cloud Platform Overview

The WP Cloud hosting platform was built from the ground up to serve Automattic’s most demanding customers. The goal was to build a secure, performant, and flexible multi-tenant WordPress hosting platform without sacrificing functionality like SFTP, SSH, and phpMyAdmin or flexibility such as the ability to install any plugin or theme that customers expect.

WP Cloud utilizes Linux kernel namespaces and cgroups to isolate sites from each other for both security and performance purposes. All customer code is executed within these boundaries as well as inside a chroot. WP Cloud does not utilize Docker or VPSes for site hosting. While not used for site hosting, Docker containers are leveraged for some features, such as SSH access to add protections against malicious actors and mistakes.

When created, each WP Cloud site is assigned to a pool. A pool consists of a primary server and a secondary server in different geographic regions. Traffic for all WP Cloud sites enters via one of Automattic’s 27 edge data centers. If edge caching is enabled for a given site and a copy of the requested content is available at the edge, it will be returned to the client. If edge caching is not enabled, the request will be sent to the closest origin data center. As of January 2024, origin data centers are located in the following cities.

  • Amsterdam, The Netherlands
  • Ashburn, VA
  • Los Angeles, CA
  • Dallas, TX

From there, we determine which data center houses the primary server for the site and route traffic via the Automattic backbone network to that server. All traffic is encrypted via TLS from the time it enters our edge until it arrives at the customer’s site.

The primary and secondary servers mirror each other. They run the same exact software and contain the same exact data for all sites hosted on them. We replicate data in real time between the primary and secondary servers.

WP Cloud hosting servers are “self-sufficient”. Everything needed to serve a single site exists on one server. This includes NGINX, PHP, the site’s document root (files), MariaDB, the site’s database, Memcached, etc.

Even new servers (and entire data centers) break occasionally. When this happens, our origin routers detect the failure and immediately start an automatic failover by sending traffic to the secondary server in the site’s pool. This server is designed to serve traffic in a “read only” state until engineers confirm the primary server has failed. At this point, using the platform API, the relationship between the primary and secondary servers is severed and the new server begins serving traffic in “readwrite” mode.

In some cases, traffic spikes, DDoS attacks, code bugs, etc. can cause a single site or a subset of sites to use an inordinate amount of resources (usually CPU). WP Cloud uses cgroups and a custom scheduler to ensure that when this happens, the impact on other sites in the same pool is minimized. This same scheduler also allows sites to “burst” up to the full available resources in a pool if needed, as long as it doesn’t negatively impact other sites.

The WP Cloud platform also has built-in tooling that allows our engineers to relocate sites between pools if needed. Essentially, this is a zero-downtime migration to a different server, possibly in a different datacenter, maybe even in a different country. We use this to balance usage across pools and optimize performance for a single site or subset of sites. As a result, WP Cloud sites may be moved to a different data center for performance or failover reasons at any time.

Multiple layers of caching are enabled by default on each WP Cloud site. This includes page caching (Batcache leveraging Memcached), database query caching (WordPress Persistent Object Caching, leveraging Memcached), OPCache, and global edge caching (if enabled).

This setup ensures that our hosting infrastructure can support thousands of active users per site, handle massive bursts of site traffic, and cater to some of the largest eCommerce sites on the web. The platform easily accomplishes top-tier results in some of the most critical load tests, including K6 Load Storm, K6 Static, WebPageTest, and WPPerformanceTester. Load test performance that easily exceeds many of the enterprise-level hosting options available.

Every WordPress site on WP Cloud will include a managed copy of WordPress Core, Akismet, and Jetpack. These are read-only and shared across all sites. Using a single copy of these files and other popular plugins greatly improves OPcache efficiency and therefore performance, as well as simplifies and accelerates the process to deploy updates to all sites on the platform. For example, we can deploy a Jetpack update across hundreds of thousands of sites in under two minutes.

All WP Cloud sites have phpMyAdmin pre-installed and accessible via a pre-determined URL. Authentication uses a time-based token system, so we provide an API method that allows a seamless login to any site’s phpMyAdmin installation.