OPcache is the single most impactful PHP performance setting you can tune. Without it, PHP parses and compiles every script on every request. With a well-tuned OPcache, compiled bytecode is served from shared memory — no disk reads, no compilation. This guide covers every production-relevant directive, preloading for Drupal/frameworks, JIT configuration for PHP 8+, and the Docker-specific concerns that trip up most setups.
The Migrate API is the canonical way to move data into Drupal 11 — whether that means a one-off CSV import, a recurring feed from a legacy database, or a full Drupal 7 upgrade. It implements an ETL (Extract–Transform–Load) pipeline via plugins, and every step is swappable. This article walks through two real scenarios: importing nodes from a CSV file and pulling records from a legacy MySQL database.
Core Concepts
Every migration is a YAML configuration entity composed of three sections:
Brute-force login attempts, credential stuffing, and API scraping are routine threats for any public-facing server. Nginx's built-in rate limiting module stops these attacks at the edge — before PHP even starts. This guide covers the full directive set, burst configuration, exempting trusted IPs, protecting Drupal's login and JSON:API endpoints, and avoiding the most common misconfiguration that lets bursts overwhelm your server.
Most PHP developers know just enough about Composer autoloading to make it work. But when class resolution fails in a Drupal module, a package publishes duplicate class definitions, or a legacy library throws "class not found" mid-request, you need to understand what the autoloader is actually doing. This article covers all four autoloading strategies, how they interact, and the performance trade-offs that matter in production.
Drupal 11's theming system uses Twig 3, a modern templating engine that keeps logic out of templates and makes overriding core HTML straightforward. The recommended starting point is the Starterkit — a generator that scaffolds a fully functional sub-theme from Drupal core's stable base, so you own all the HTML from day one without inheriting any styles you did not choose.
Interaction to Next Paint (INP) replaced First Input Delay (FID) as a Core Web Vital in March 2024. Where FID only measured the delay before the browser started handling the first interaction, INP measures the full latency of every interaction on a page — from user input to the next visual update. A slow click handler that blocks the main thread for 300 ms will generate a poor INP score even if FID was perfect.
The threshold: good is 200 ms or below, poor is above 500 ms. Measured at the 75th percentile across all interactions in a session.
Drupal's testing infrastructure is built on PHPUnit, but it layers three distinct test types on top of it — each with different bootstrapping, speed, and fidelity trade-offs. Most Drupal developers have run tests but haven't written them deliberately. This guide covers what each test type is actually good for, how to set up a working test environment, and real module test examples that demonstrate the patterns you'll use daily.
Tree-sitter is a parser generator and incremental parsing library that gives text editors access to a concrete syntax tree of the code being edited. Emacs 29 shipped with built-in tree-sitter support, and Emacs 30 continues to expand it. For PHP developers, tree-sitter means faster, more accurate syntax highlighting, structural navigation, and the foundation for features like combobulate and future indentation improvements.
Cumulative Layout Shift measures visual instability — how much the page content moves around while loading. Google uses it as a Core Web Vital, and a poor CLS score (above 0.25) directly affects rankings. The target is 0.1 or below at the 75th percentile. This article goes through every major cause with production-ready code fixes, covering images, web fonts, dynamic content, ads, and Drupal-specific patterns.
Pre-built Emacs configurations like Doom Emacs and Spacemacs are impressive. They give you a working, polished setup in minutes. But they are also someone else's opinion about how Emacs should work, and when something breaks — or when you want to understand what is actually happening — you are left reading hundreds of files written by strangers.