Imagine an environment where WordPress performs ten times faster than existing PHP web hosts. How many problems that frustrate developers and marketers would this solve?

  • Boost conversion rates due to the increasingly vital load-time metric? Yes.

  • Retain visitors and customers with ever-shorter attention spans? Yes.

  • Scale user-tailored, dynamic websites (like membership and e-commerce) without paying for 10x the servers? Yes.

  • Handle unexpected traffic spikes with grace? Yes.

  • Create unique, computationally-intensive applications without a huge custom in house infrastructure cost? Yes.

As WordPress continues to make inroads into the application and content platform space, WP Engine customers are hungry for even more performance and power. For those looking for a breakthrough in speed and stability, tuck in for a longer post. It’s worth it.

Today, we are announcing WP Engine Mercury: our new enterprise WordPress platform.

What is Mercury? Well, to be exact, Mercury provides high availability, geo-redundant, master / master replicated, HHVM, and an auto failover protection mechanism for HHVM to PHP 5.5.

Phew! Or, put simply: it’s a completely new platform from WP Engine built for unparalleled performance and reliability. Let’s do a bit of unpacking.

WP Engine Mercury Chart

HHVM on WP Engine With Auto Failover to PHP 5.5

At the center of our new WordPress platform is a technology called HHVM. HHVM is an open source project created by Facebook, designed to run PHP code linearly faster than standard PHP 5.5. If PHP 5.5 is a stock Toyota Celica, HHVM is an F1 or NASCAR race car. (You can read more about HHVM here.)

How much faster is it? Let’s look at some benchmarks from our independent launch partner, 10up, that helped us design and test this system.

(It should be noted that for the PHP-FPM numbers we used version 5.5 on a WP Engine configuration, which is quite fast by itself. As a side note, PHP 5.5 is available on request for all customers as of today.)

Let’s dive in and look at just a few examples of how awesome this system really is. We’ll start with a system that has lots of dynamic content and logged in users.

It is important to note that these numbers are based off of siege testing at a high interactivity rate. This mean the artificial logged in user in these tests does one action per second. This is much higher than most regular users since when we see humans interact with a site it is every 6-60 seconds with a site. So real life use cases would be able to handle many more users than these show. But we wanted to aggressively attack the system with lots of dynamic traffic… so the settings were set high. The data below was generated by a third-party testing service, such as

Also, these numbers are all generated by an apples-to-apples comparison with a single server used as a component of the best-in-class WP Engine platform (PHP FPM 5.5). See the end of post for performance numbers from a standard Mercury deployment, which includes multiple servers.

WPE Charts

Chart 1: bbPress
  • Load testing done from a variety of platforms
  • No page caching, no traffic shaping from load balancer, no throttling
  • Running a generic WordPress + bbpress installation
  • Consistent results showing HHVM on average results in 5.6x faster response time over multiple and long tests

WPE Charts

Chart 2: bbPress High Concurrency

  • Load testing done from a variety of platforms
  • No page caching, no traffic shaping from load balancer, no throttling
  • Running a generic WordPress + bbpress installation
  • At 250 concurrent users, HHVM consistently results in average 3.6x faster response time


Chart 3:Custom WordPress ( testing)
  • Load testing done from a variety of platforms
  • No page caching, no traffic shaping from load balancer, no throttling
  • Running a custom WordPress site with theme and plugins
  • Consistent results showing HHVM on average results in ~3.9x faster response time

This is an absolute win by any stretch of the imagination. Under high load, HHVM performs an average of 3-6 times faster than our already lightning fast standard WP Engine platform.

That’s up to a 600% performance increase.

However, just like driving an F1 car isn’t safe for your everyday driver, WordPress on HHVM is sometimes unstable in production environments. This is to be expected from a newer project, and stability will continue to improve as HHVM rapidly improves. During extensive lab testing, we found that the HHVM services needed to be restarted roughly once every 24 hours or more. In large server configurations of tens to hundreds that are load balanced, HHVM is a good option, but clearly for single or small server deploys it wasn’t working yet.

Turns out we’re a stubborn bunch, and we really wanted to drive a race car. So we found a way to run PHP and HHVM side by side on the same server. When HHVM fails, PHP kicks in instantly while HHVM restarts. Our fallback PHP stack is the highly optimized, market leading WP Engine WordPress stack you know and love. Put simply: in the few seconds it takes the HHVM supercharger to restart, we serve your website on our current best in class platform.

Restarting HHVM takes <1m, but it needs a restart about every 24 hours, so you could say that 99.9% of the time you’d be running on HHVM, and that 0.1% of the time, when it does need an auto-restart, your visitors will never know it’s happening.

But we didn’t want Mercury to be just that. We wanted to raise the bar even more for the new platform with greater speed and stability.

We then decided we needed to optimize it even further! So we called up the amazing HHVM team at Facebook and worked with them on making it even faster. Their insight and help was vital to getting maximum performance and stability out of the stack.

Here is what the Facebook open source team had to say about it:

“The enhanced speed and performance by HHVM in production environments is an obvious boon for PHP developers and the WP Engine Labs team has done an impressive job in democratizing HHVM for the open-source community, said Paul Tarjan, head of Open Source for HHVM at Facebook.

We are excited to work alongside the Labs team to fine-tune the stack to reach HHVM¹s full potential and drastically speed up PHP execution. PHP is the bedrock of Facebook as well as much of the Internet and this announcement should come as a major fillip for the entire developer community.”

Geo Redundant Master / Master Servers

Mercury is layered upon a brand new geo-redundant master / master platform. This means that two identical, fully in-sync clones of the server exist at the same time. WP Engine Mercury can switch between them instantaneously, serving up data from the clone best able to handle the load.

For optimal data integrity and uptime, the clones exist not just in different data centers, but in entirely different geographic regions. If the great Chicago fire ever happens again, your San Antonio data center would keep your website running without missing a news beat.

Out-of-Box Vagrant Support (WPEV)

Mercury isn’t just a breath of fresh air for site owners: it’s a joy for experienced developers. Cloning production environments for local development and private staging environments can be a huge hassle. Leading development teams like 10up use a system called Vagrant to streamline this need. Mercury customers will be provided a Vagrant configuration that looks like your production environment to streamline developer setup, saving time and money.

Built in Partnership with an Amazing Agency

10up is considered a leading full stack engineering team in the WordPress space. In envisioning and building Mercury we partnered with them to help us architect a new way to serve WordPress. Leveraging their knowledge working with clients such as AT&T, JDRF, TechCrunch, Time, Wired, AARP, and NBC Universal, we built a system to service the future of dynamic content. We did not set out to make small, incremental improvements; the result is infrastructure and hosting technology years ahead of its time.

Already in Production

We’re excited to announce that Mercury is live in alpha-labs production! A huge thank you to 10up, who partnered with us to build this next generation platform. Standing behind their work, is running on Mercury right now – and it’s as insanely fast as you’d expect.

In Summary

HHVM Stability – Achieved

Server Redundancy – Achieved

Advanced Development Workflow – Achieved

Websites in Production (not vaporware) – Achieved

Welcome to Mercury, the next generation WP Engine platform.


What is HHVM:

HHVM is an open-source virtual machine designed for executing programs written in Hack and PHP. HHVM uses a just-in-time (JIT) compilation approach to achieve superior performance while maintaining the development flexibility that PHP provides.

What is JIT:

In computing, just-in-time compilation (JIT), also known as dynamic translation, is compilation done during execution of a program – at run time – rather than prior to execution.

Or here is an analogy:

PHP5 is an interpreter. That means basically the same as it means when you’re translating from Japanese to German. You look at the original document, and interpret it into the new language, then do it again and again for each sentence. Instead, as you run a JIT’ted program, it takes a block of Japanese, translates it to German, then remembers this translation so the next time you see this paragraph you just use the German copy instead. This way you don’t have to re-interpret lines over and over.

Another option is to just translate the document beforehand (pre-compile). JIT’ing is better for PHP, because you don’t know the nuances of of which paragraph flows into which paragraph beforehand (documents read only top to bottom, but programs jump around a lot). If you JIT something you can use the knowledge of how the document jumps around to make it faster.

What is master / master (multi-master replication):

Multi-master replication is a method of database replication which allows data to be stored by a group of computers, and updated by any member of the group. All members are responsive to client data queries. The multi-master replication system is responsible for propagating the data modifications made by each member to the rest of the group, and resolving any conflicts that might arise between concurrent changes made by different members.

What is Active Active:

See master master above

What is Bytecode:

Bytecode, also known as p-code (portable code), is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (normally numeric addresses) which encode the result of parsing and semantic analysis of things like type, scope, and nesting depths of program objects. They therefore allow much better performance than direct interpretation of source code.

What is FPM:

PHP-FPM (FastCGI Process Manager) is an alternative PHP FastCGI implementation with some additional features useful for sites of any size, especially busier sites.

tomasTomas Puig was the head of Labs for WP Engine. His career started at NASA Ames Research Center where he worked on computer security and web development. Tomas then worked in the digital ad agency industry with firms LEVEL, COG1, Rosetta, and Propane—notable clients included Facebook, New Relic, Kaiser, Cisco, and Google. Projects under his direction have won 4 Gold National ADDYs and several Cannes CLIOs. Tomas loves video games, Legos, and playing with his dog Éowyn.