WordPress Core Contributor Konstantin Kovshenin has released a new page caching plugin called Surge. Searching the WordPress plugin directory, you will find hundreds of caching and cache purging plugins, but this one stands out from competitors in that it requires no configuration. The plugin starts working as soon as it’s activated, and there are no options.
What kind of performance improvements can you expect with Surge activated? Kovshenin’s tests indicate that WordPress site performance on cheap hosting can be significantly improved with the plugin:
Surge stores cache files on the filesystem, leveraging the Linux kernel page cache for efficient in-memory caching and invalidation. In various load tests, Surge has shown to easily handle 1000-2500 requests per second at 100 concurrent, on a cheap single-core virtual server with only 1 GB of memory. That’s over 70x faster than a stock WordPress install with a default theme and no plugins.
Kovshenin built Surge because he could not find a suitable plugin to work well with Sail, the CLI tool he has been developing for deploying WordPress apps to DigitalOcean.
“The biggest blocker for me was the configuration, screen after screen after screen, the amount of hoops I had to jump through just to get things working,” he said. “And sure, there are on-screen guides and wizards, video tutorials, hundreds of documentation articles, but all I wanted was a page caching plugin, not a rocket (no pun intended). I had to roll my own.”
In the interest of simplicity, Surge doesn’t even come with a “clear cache” button. Kovshenin said the plugin will automatically invalidate cached entries on various different events, such as when content is updated. He said you can toggle the plugin off and on if for some reason you need to clear the page cache.
“If you have to flush the cache, it means my invalidation is not good enough for you,” Kovshenin said in response to Twitter inquiries about no button to purge the cache. “If you do find yourself flushing the cache every once in a while, do let me know why. I’m sure there are plenty of cases I haven’t considered yet.”
When asked if Surge works with sites that have lots of dynamic content, Kovshenin said only anonymous requests are cached right now. Surge also forces some requests, such as robots.txt and favicon.ico, to be anonymous for better cacheability.
“Expanding into logged-in territory is something on my list to look at, but not going to make any promises,” he said.
I tested Surge on a few simple blog sites and found that it works as advertised. On one site it took the GTMetrix Performance score from 91% to 99%. Please note that the plugin requires PHP 7.4+.
Surge is available for free on WordPress.org. If you are already using a page caching plugin, you will need to deactivate it if you want to try Surge. Kovshenin cautioned in his announcement post that many managed WordPress hosts already have some built-in caching in place, so it may be a good idea to check with your host before adding a caching plugin.