Posts

Showing posts from November, 2026

Hardening Self Hosted Linux CMS Nodes

Image
Command-line diagnostics running on a minimalist Linux desktop (Photo via Unsplash) Most Linux server security guides read like they were written by someone who has never shipped a Friday afternoon hotfix. They hand you forty sysctl knobs, disable half the PHP standard library, and suggest setting every directory to 0400 . Twenty minutes later, your CI runner breaks, Composer throws permission errors, and editors can't upload a 300KB hero image. Real system hardening for a self-hosted CMS box has to survive routine deployments and messy editorial workflows. If you already moved off managed hosting following our notes on self-hosting web stacks on bare metal , the next step is shrinking the blast radius without breaking atomic releases. On WordPress, Drupal, Craft, or Statamic nodes, breaches rarely start with a kernel zero-day. They start with an unpatched plugin, a weak SSH password, or a writable webroot. Here is the baseline I run on Debian 12 and Ubuntu 24.04 CMS nodes. E...

Automated Offsite Backups and Drills

Image
Git repository commit graph and deployment pipeline view (Photo via Unsplash) A few years back, a client called me at 6:40 AM because a botched plugin update had dropped three tables from their production CMS database. No problem, their team said—they'd run a nightly mysqldump cron job since 2021, and /var/backups held months of neatly dated .sql.gz files. I SSHed in and checked the latest archive. It was 20 bytes long. Every archive from the past four months was 20 bytes long. A routine MySQL password rotation had broken authentication in the script, cron had mailed stderr to a local root mailbox nobody read, and gzip had compressed an empty error stream into a valid 20-byte header every night at 02:00. That failure mode is painfully common. When you're self-hosting web stacks on bare metal without a managed cloud control plane watching your disks, an untested nightly dump script is basically a placebo. Real disaster recovery isn't measured by how many archives s...

Edge Caching Without Stale CMS Edits

Image
Real-time server throughput metrics during peak traffic (Photo via Unsplash) Every publishing team hits the same ugly afternoon eventually. An editor spots a wrong dollar figure in a headline, fixes the typo, clicks Publish, and opens the article in a private window. Nothing changes. Five minutes later Slack lights up. Someone appends ?refresh=1 to the URL, which fixes their laptop and helps nobody else. Twenty minutes after that, the corrected headline finally appears, well after the social traffic has already peaked. This isn't a deep mystery of distributed caching. It happens when someone puts a content delivery network in front of a dynamic CMS, sets a flat twenty-minute TTL on HTML to shield the origin, and treats invalidation as an afterthought. Dropping the TTL to 30 seconds doesn't solve it either; you just hammer the origin every half-minute and still look sluggish to editors. Watching your cache hit ratio sink from 98% to 60% puts immediate read pressure on the d...

Database Indexing for Slow CMS Views

Image
Traffic latency histograms rendered on an operations dashboard (Photo via Unsplash) A few months ago, a regional trade directory I maintain started throwing sporadic 504 Gateway Time-out errors during a Tuesday newsletter blast. Nothing in the basic server graphs looked alarming. The box is a rented 8-core AMD EPYC server running Debian 12, Nginx, PHP 8.2-FPM, and MariaDB 10.11, the same single-node layout I covered when writing about self-hosting web stacks on bare metal . Load average sat around 1.7. Free RAM topped 18 GB. Disk wait stayed under 3 percent. Yet the site felt completely wedged. The homepage and individual listings still responded in 35 milliseconds. We'd already sorted out full-page caching back when I documented edge caching without stale CMS edits . What broke the site was the filtered catalog archive, URLs like /equipment/?region=midwest&status=verified&sort=updated . Faceted query strings bypass page caching by design because thousands of filter com...