Live data from Hacker News

How to Run WordPress completely from RAM

rickconlee.com

21–30 of 61 posts

Re: How to Run WordPress completely from RAM

#21

AI slop - AI generated image at the top and text is full of em-dashes and chatGPT-isms.

The bigger tell is that half the article is unnecessary space-filling hyperbole...

The overwhelming majority of the speed-up here would come from the database, which is trivially easy to run on tmpfs. When using Docker, it's literally a one-liner! For example:

docker run -d --tmpfs /var/lib/mysql -p 127.0.0.1::3306/tcp -e MYSQL_ROOT_PASSWORD=[password] mariadb:11.8

Of course you need a really good backup story for this to be a reasonable choice.

Re: How to Run WordPress completely from RAM

#22

I assume that modern filesystem caching to RAM is incredibly sophisticated, but wouldn't a typical website already be fully served from RAM? If you only have a few megabytes of code + assets, won't the OS see this is hot data, not being updated, so it is no longer being read from disk sometime after the initial read?

A performance problem I’ve run into with small websites like this one is many caching systems are tuned for bigger companies or hotter programs, and basically every load ends up an “exceptional” cold start case. VMs wake up, Cloudflare actually only keeps your data one place, there’s no sane HTTP caching value, and, yeah, files are read from disk. Worse, it’s easy to miss during testing by loading things more frequen…

> files are read from disk.

Disk as in spinning round circles, or disk as in NVMe drive, because there's a pretty massive difference in latency.

Re: How to Run WordPress completely from RAM

#23

AI slop - AI generated image at the top and text is full of em-dashes and chatGPT-isms.

"Let’s break down the tune. This is not a just WordPress install. This is a brass-knuckle brawl between performance and everything that dares to slow it down."

Re: How to Run WordPress completely from RAM

#24
Linux page cache + PHP-FPM OPcache already keep hot PHP in RAM (no per-request disk hits after warm-up), and if your dataset fits in memory you size innodb_buffer_pool you don’t move the whole MariaDB datadir to tmpfs and throw away durability.

Re: How to Run WordPress completely from RAM

#25

AI slop - AI generated image at the top and text is full of em-dashes and chatGPT-isms.

The bigger tell is that half the article is unnecessary space-filling hyperbole... The overwhelming majority of the speed-up here would come from the database, which is trivially easy to run on tmpfs. When using Docker, it's literally a one-liner! For example: docker run -d --tmpfs /var/lib/mysql -p 127.0.0.1::3306/tcp -e MYSQL_ROOT_PASSWORD=[password] mariadb:11.8 Of course you need a really good backup story for th…

Wow that's neat, had no idea about --tmpfs flag (I submitted this article because I found it interesting but am not the author)

Re: How to Run WordPress completely from RAM

#26
Reminds me of MongoDB (first few years at least). Screaming fast. Until a crash happens and the data is missing - then all that's left is screaming.

I also run MariaDB in RAM, but only for integration tests where data is fictional anyway. Otherwise I'm sure you can't come up with a better solution than they did just by using some sysadmin tricks.

Re: How to Run WordPress completely from RAM

#27
Im skeptical about this. PHP Opcache already loads and compiles all php files into ram, such that it only happens once (or again when theyre modified). Its the single most useful thing you can do with a wordpress site (other than running on decent hardware, which most hosts do not have)

Mysql/mariadb have a lot of ram caching as well - they haven't just been sitting on their hands for decades... Still, lets say that this helps - you could probably just use db replication to another machine (or even another container on same machine) that persists to disk.

And the (likely AI-generated) colour commentating got tiring fairly quickly.

Most of all, without a before/after comparison, this is meaningless

Re: How to Run WordPress completely from RAM

#28

I assume that modern filesystem caching to RAM is incredibly sophisticated, but wouldn't a typical website already be fully served from RAM? If you only have a few megabytes of code + assets, won't the OS see this is hot data, not being updated, so it is no longer being read from disk sometime after the initial read?

Depends on the amount of data/assets. With all the AI bots its easy for (default) caches to be undersized since sites no longer have most frequently accessed URLs, every URL (and query param combo) ends up being frequently accessed.

Re: How to Run WordPress completely from RAM

#29
post #11

Earlier quoted context omitted.

While WP is not my first choice, it's also not good to give binary answers as the only factual options. There will be lots strapi and astro or whatever preference/interpretation we have personally can't do.

It's always "in most cases". I simply don't see space for WordPress on green field sites anymore. If something is so small it does not require CMS - it's better to use pure HTML. Otherwise "in most cases" it's better to use headless CMS.

Do you work with non-technical users? There are few (none that I'm actually aware of) static site generators that are friendly enough for a comms team in a large enterprise for example. I note that Strapi also puts key features such as SSO behind an Enterprise pay wall... so that's already a massive negative.

WordPress has it's place, a blanket no against one of the most popular CMSes on the Internet is a pretty hot take.

Re: How to Run WordPress completely from RAM

#30

Mandatory reminder - don't use WordPress in 2025. Use headless CMS plus static site generator. e.g. Strapi plus Astro

WP has corporate momentum/network effect though, in the same way that Jira, Jenkins, and Java (among other things) have.

For a long time now WP no longer just caters to the hacker "Code is Poetry" crowd---and, of course, even less so nowadays with the controversies WP has embroiled itself with. The people who are inclined to choose WP by default do so because of the wealth of plugins available to them, be that Shopify integration or fine-grained tracking of a marketing campaign. They would wonder why someone would ever prefer something "headless". They think static websites are the dinosaurs the Y2K comet wiped out.

Sure we can argue about whether WP is the "best solution" but WP is definitely the solution that works acceptably out-of-the-box. Your CMS of choice probably has a bunch of out-of-the-box solutions for common concerns as well but I doubt that it can handle the edge cases that Head of Marketing will inevitably introduce with their ol' reliable set of integrated services. Shopify + Google Analytics + Salesforce + Airtable[1] always worked for them with WP but suddenly this allegedly-better "headless" CMS is throwing all sorts of dumb errors.

And if a plugin is not available, there is no shortage of WP/PHP developers who can make one at a reasonable price. In contrast, I'm sorry, but honestly your comment is the first time I've heard about Strapi and Astro.

I'm not saying I like the status quo but if someone asks me for a WP site, I give them a hardened EC2 box with WP over Apache/NGINX. Then I return to frying bigger fish.

[1] Just an example.

Post reply on HN