TechEarl

Building the web since 2000

Field notes on shipping real systems.

Practical writing on PHP, MySQL, Linux, WordPress, security and the weird corners of the web, by one engineer who's been shipping them for over two decades.

Share this siteCopied
Latest

Fresh from the desk

The Agentic Browsing audit is live in PageSpeed Insights. Paste your URL to get a score, then pass the accessibility tree, CLS, and llms.txt checks. Full rule-by-rule guide.

How to Pass the PageSpeed Agentic Browsing Audit

The Agentic Browsing audit is now live in Google PageSpeed Insights, no Chrome Canary needed. Paste your URL, read the fractional score, and pass every check that says whether AI agents can read and act on your site.

Four reliable ways to change a WordPress password: admin dashboard, WP-CLI, direct in the database, or email reset. Includes the WP 6.8+ bcrypt hash format.

How to Change a WordPress Password

Four reliable ways to change a WordPress password: admin dashboard, WP-CLI, directly in the database with the correct phpass or bcrypt hash, and the lost-password email reset.

WordPress

Empower your web dreams, one block at a time

Hosting markup as MRR, operational time as hidden cost, per-client profit across four hosting tiers. The honest math for WordPress agency profitability.

How Hosting Choices Affect Agency Profitability

Hosting is one of the most leveraged decisions an agency makes for margin. The honest math: hosting markup as recurring revenue, operational time as hidden cost, the per-client profit comparison across the four hosting tiers.

A WordPress Hosting Decision Tree for Agencies

Hosting choices for WordPress agency clients are operational decisions, not pricing decisions. The decision tree by traffic tier and workload type: shared, managed WordPress, managed VPS, self-managed VPS. Plus the agency-side implications of each.

Managed WordPress Hosting vs VPS for Agencies

Managed WordPress hosting buys you operational simplicity at a per-site price premium. VPS buys you flexibility and lower per-resource cost at the price of in-house sysadmin time. The honest comparison and the agency-side break-even math.

Database

Unleash the power of your data universe

Elasticsearch 9.x cheat sheet: index and document operations, Query DSL, aggregations, vector / kNN search, ESQL, cluster management, and common mistakes.

Elasticsearch Cheat Sheet

Practitioner reference for Elasticsearch 9.x: index and document operations, Query DSL, aggregations, vector / kNN search, ESQL, cluster management, version compatibility notes, and the gotchas that bite first-time operators.

MySQL Cheat Sheet

MySQL cheat sheet covering CLI commands, database and table operations, joins, indexes, backups, user management, and transactions, with version notes for 5.7, 8.0, and 8.4.

How to Upgrade MySQL 8.0 to 8.4 LTS

MySQL 8.4 is the new LTS branch, with Premier Support through April 2029 and Extended Support through April 2032. The 8.0 to 8.4 upgrade is much smaller than 5.7 to 8.0, but removed options and the new authentication_policy variable still bite. Full procedure with rollback.

How to Migrate from MySQL 5.7 to 8.0 (Step-by-Step)

MySQL 5.7 has been past its EOL since October 2023. Here is the migration to 8.0: prerequisites, dry-run with mysqlcheck, in-place upgrade, the authentication-plugin change that breaks old clients, and rollback if it goes sideways.

Linux

Freedom to innovate, power to perform

Why find scripts break between macOS and Linux: -printf and -regextype are GNU only, regex flavors and stat format strings differ. The portable find subset, the gotchas, and brew install findutils for gfind.

BSD find vs GNU find: Every macOS vs Linux Difference That Matters

macOS ships BSD find; Linux ships GNU find. The two share a name and most of an interface, but -printf, -regextype, and the stat format strings diverge hard enough to break scripts shipped between platforms. The full divergence list, the portable subset that works on both, and how to get GNU find on a Mac.

How to Count Unique Matches with grep, sort, and uniq

The grep -o 'pattern' file | sort | uniq -c | sort -rn pipeline is the classic log-analysis one-liner. Why sort must come before uniq, how each stage works, worked examples for top IPs and status codes, the awk one-pass alternative for huge files, and the BSD vs GNU notes.

find vs locate vs mlocate: Which File Search Tool to Use

find walks the live filesystem every time it runs: always current, sometimes slow. locate queries a prebuilt database: instant, but stale until the next updatedb. This breaks down the locate family (mlocate, plocate, slocate), the macOS situation, and exactly when to reach for each one.

How to grep and Print a Specific Column (grep + awk)

grep filters lines, awk extracts fields. The classic pipe is grep 'pattern' file | awk '{print $2}'. This covers awk field basics ($1, $NF), custom separators with -F, multi-column output, the cases grep -o and cut cover on their own, and the fact that awk's own pattern match makes the grep half optional.

DevOps

Automate, integrate, accelerate your success

rsync files modified in the last N days by piping find -print0 into rsync --files-from=- --from0. The relative-path gotcha, the dry run, BSD vs GNU notes, and when rsync filters replace find.

How to rsync Only the Files find Selected

rsync has no native time filter, so the standard trick is to let find pick the files and feed the list to rsync. The one-liner is find ... -print0 | rsync --files-from=- --from0, and the failure mode is always the same: the paths in the list have to be relative to the rsync source argument. The breakdown, the dry run habit, and when rsync's own filters make find unnecessary.

How to Archive Files Matching a find Pattern with tar

find locates the files, tar archives them. The safe pairing is find -print0 piped into tar reading a NUL-delimited list from stdin: no breakage on spaces or newlines. The flag breakdown, the macOS BSD tar vs GNU tar difference, the -exec append alternative, archiving by modification time, and the compression choices.

grep vs ripgrep vs ag: Which Search Tool to Use

grep is on every system and searches exactly what you point it at. ripgrep (rg) is the fast Rust-based default for code search: it skips .gitignore'd, hidden, and binary files unless told otherwise. ag (the_silver_searcher) was the older fast-grep, now largely superseded by ripgrep. This breaks down speed, defaults, regex engines, and exactly when to reach for each one.

How to Run find in Parallel with xargs -P

find . -type f -name '*.log' -print0 | xargs -0 -P 4 -n 1 gzip compresses every matched file four at a time. The flags that make it work: -P for parallel workers, -n 1 so each worker gets one job, -0 paired with find's -print0 for safety. When parallelism helps (CPU-bound work) and when it just thrashes the disk.

JavaScript

Building tomorrow's web, today

Using Web Crypto (globalThis.crypto) in Node.js

globalThis.crypto (the Web Crypto API) is a global in Node 19+ with no shim or flag: crypto.randomUUID(), getRandomValues(), and crypto.subtle. How it differs from the node:crypto module, and when you still need a shim.

How to Add a Timeout to fetch() with AbortController

Add a timeout to fetch() the modern way: pass AbortSignal.timeout(5000) as the signal. Plus AbortController for manual cancel, combining signals with AbortSignal.any, and catching AbortError. Works in the browser and in Node.

Modern JavaScript Array Methods: at, flat, toReversed, and groupBy

The array methods worth reaching for in modern JavaScript: at() for negative indexing, flat(Infinity), the copying toReversed/toSorted/toSpliced/with that fix the mutation trap, and the corrected grouping API (Object.groupBy, not the Array.prototype.group that never shipped).

CSS

Style with purpose, design with passion

CSS :has() is the relational parent selector that styles an element based on its descendants. Baseline in all engines: form-state rows, quantity queries, the previous-sibling trick, and the @supports gate.

The CSS :has() Parent Selector: A Complete Guide

CSS :has() is the parent selector we waited 20 years for: style an element based on what it contains. Now Baseline in every engine. Form rows, quantity queries, the previous-sibling trick, and the @supports gate for old browsers.

Security

Protecting digital assets, ensuring peace of mind

The API security tools worth using in 2026: Burp Suite, mitmproxy, OWASP ZAP, kiterunner, Postman, jwt_tool, graphql-cop. Compared with honest trade-offs.

The Best API Security Tools in 2026

The API security tools I actually reach for in 2026: Burp Suite, mitmproxy, OWASP ZAP, kiterunner, Postman, jwt_tool, graphql-cop, and the commercial platforms. Strengths, weaknesses, and how I decide which to use.

The Best File Upload Vulnerability Tools in 2026

The file upload vulnerability tools I actually reach for in 2026: fuxploider, Burp Upload Scanner, weevely, exiftool, ffuf, and the webshell repos. Strengths, weaknesses, and how I decide which to use.

The Best Application-Layer DoS Testing Tools in 2026

The application-layer DoS testing tools I actually use in 2026 for resilience and load testing: k6, wrk2, slowhttptest, recheck, h2spec/h2load, Burp Turbo Intruder, Locust, and ZAP. Strengths, weaknesses, and how I pick.

The Best Clickjacking Tools in 2026

The clickjacking tools I actually reach for in 2026: PoC generators, OWASP ZAP, DNSChkr HTTP Security Headers, Mozilla Observatory, Burp Active Scanner, and the post-Yibelo double-clickjacking PoC repos. Honest framing on a thin tool space.

Hardware

Powering innovation through silicon

PHP

Building robust backends, delivering reliable solutions

Use a .env File for WordPress Config and Secrets

Keep API keys, database credentials, and SMTP secrets out of wp-config.php and out of git by loading them from a .env file with vlucas/phpdotenv, fed into define() where WordPress expects constants.

RegEx

Master patterns, unlock possibilities

The top 5 online regex testers for 2026: Regex101, RegExr, RegexPlanet, Debuggex, and Rubular, compared by regex flavor support, real-time matching, debugging features, and who each one is best for.

Top 5 Online Regex Testers for 2026

The five online regex testers I actually use, ranked: Regex101, RegExr, RegexPlanet, Debuggex, and Rubular. What each is good at, where each falls short, and which flavor each one supports.

Regex Word Boundaries: \b, \B, and Lookaround Equivalents

Regex word boundaries (\b and \B) match positions between word and non-word characters with zero width. The full reference with engine differences, Unicode handling, lookaround alternatives, and worked examples for whole-word replace, search highlighting, and log parsing.

Regex Anchors

Regex anchors are unique tokens that assert positions within a string without matching characters. Discover their role in pattern matching across languages.

Regex Cheat Sheet

Regex Cheat Sheet including regex symbols, ranges, grouping, assertions, syntax tables, examples, matches, and compatibility tables. Definitive Regular Expressions Quick Reference!

Humor

Take a break, laugh out loud: Your ultimate web joke collection!

Forty-five AI meeting summary jokes covering action items nobody owns, the decisions the meeting never made, the attendee list it got wrong, and the Slack thread asking what we decided.

AI Meeting Summary Jokes Nobody Read Anyway

Forty-five AI meeting summary jokes about the action items nobody owns, the decisions the meeting did not actually make, the attendee list it got wrong, and the Slack thread asking what we just decided.

AI Generated Code Jokes That Deleted the Database

Sixty-five AI generated code jokes about Copilot, Cursor, the function that imports a library that does not exist, the perfectly formatted bug, and the deployment script that ran on a Friday.

AI CEO Jokes Every Engineer Has Heard at All-Hands

Fifty AI CEO jokes about the all-hands AGI announcement, the Q3 pivot, the strategic vision deck, and the chief executive who saw one demo and now wants to disrupt the industry by Friday.

Experiences

Real stories, real insights: Where tech meets life

AI

Tools that think, write, and ship code with you

AI for WordPress Agency Operations: The Playbook

The agency-ops playbook for AI: proposals, SOWs, onboarding documents, SOP creation, meeting summaries, status reports, internal documentation. Where the per-hour gain is highest, and the rules that keep client trust intact.

Top 5 MCP Servers Every Developer Should Try in 2026

The five Model Context Protocol servers worth installing today: filesystem, GitHub, Postgres, claude-in-chrome (browser), and Sentry. With install commands, the tools they expose, and the security model.

Network

DNS, packets, and the wires between

A practical DNS health check walkthrough. Cover NS, A, AAAA, MX, SPF, DKIM, DMARC, CAA, DNSSEC in one pass, with real examples and fixes for the most common misconfigurations.

How to Run a DNS Health Check on Your Domain

A practical DNS health check covers nameservers, A and AAAA records, MX, SPF, DKIM, DMARC, and CAA. Here is the full checklist, what each record actually tells you, and how to verify all of them in one pass.

How to Block the Wayback Machine from Archiving Your Site

The Internet Archive plays by different rules than AI or search bots. Here is how to keep new pages out of the Wayback Machine, how to remove pages that are already archived, and what to do when robots.txt is not enough.

Cheat Sheets

Single-page references for the tools I reach for