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.

Latest

Fresh from the desk

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.

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.

The five must-install MCP servers in 2026: filesystem, GitHub, Postgres, claude-in-chrome, and Sentry. Install commands, capabilities, security model, and FAQ.

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.

WordPress

Empower your web dreams, one block at a time

See all
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.

How to Use ElasticPress with WP_Query

Wire ElasticPress to WP_Query so WordPress queries hit Elasticsearch (or OpenSearch) instead of MySQL. Covers installation, indexable post types, ep_integrate, the wp-cli index command, faceted search with aggregations, and when ES actually beats MySQL FULLTEXT.

Database

Unleash the power of your data universe

See all
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 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

See all

How to Optimize JPEG Images Using jpegoptim

Use jpegoptim to losslessly or lossy-compress JPEGs from the command line, in bulk, and inside CI pipelines. Includes the install path on macOS/Linux/Windows, mozjpeg / squoosh-cli / sharp comparisons, and the parallel xargs pattern for tens of thousands of images.

How to ZIP Multiple Directories Into Individual Files

Batch compress each folder in a parent directory into its own ZIP, tar.gz, or 7z archive on Linux, macOS, and Windows. Covers the for-loop one-liners, encryption, symlink handling, and the BSD vs Info-ZIP differences.

DevOps

Automate, integrate, accelerate your success

See all

How to SSH into a Google Cloud VM Without gcloud

Connect to a GCP VM using plain OpenSSH, no gcloud required. Add a public key to instance metadata, fetch the external IP, and ssh in like any normal Linux box. Plus OS Login, IAP, and a Windows PuTTY path.

JavaScript

Building tomorrow's web, today

See all

JavaScript: Force Page to Scroll to the Top on Browser Refresh

Every modern way to force a page to the top on browser refresh: window.scrollTo, the scrollRestoration API, React Router ScrollRestoration, Next.js Link scroll prop, and the events that fire on unload. Plus the hydration race that breaks naive implementations.

CSS

Style with purpose, design with passion

See all
Security

Protecting digital assets, ensuring peace of mind

See all

How to Remove WordPress Malware: The Practitioner's Playbook

A step-by-step methodology for finding and removing malware from a compromised WordPress site, written by a Security+ certified engineer who's been cleaning sites since the early WordPress 2.x era. Covers every attack vector: file backdoors, database injections, .htaccess hijacks, wp-config tampering, and recurring reinfection. Originally written in 2016, updated regularly as new patterns emerge.

WPScan Usage Guide and Man Page (2026)

WPScan v3.8+ usage reference for WordPress security audits: install on Linux/macOS, API token setup, the command patterns that matter (enumerate users, vulnerable plugins, brute force), JSON output, and how WPScan compares to Wordfence, Sucuri, and WPSec.

Hardware

Powering innovation through silicon

See all
PHP

Building robust backends, delivering reliable solutions

See all
How to install the Gearman PHP extension on Ubuntu 22.04 and 24.04 LTS for PHP 8.2, 8.3, and 8.4. Two install paths (apt and PECL), php.ini wiring, gearmand service setup, a working client/worker test, and when Gearman still makes sense vs Redis, RabbitMQ, and SQS.

Install Gearman PHP Module on Ubuntu (PHP 8.x)

How to install the Gearman PHP extension on Ubuntu 22.04 and 24.04 LTS for PHP 8.2, 8.3, and 8.4. Two install paths (apt and PECL), php.ini wiring, gearmand service setup, a working client/worker test, and when Gearman still makes sense vs Redis, RabbitMQ, and SQS.

PHP Memory Limit: How to Fix 'Allowed Memory Size Exhausted'

Increase the PHP memory_limit via php.ini, .htaccess, ini_set(), the -d CLI flag, PHP-FPM pool config, or wp-config.php. Covers the modern PHP 8 defaults, the OPcache caveat, and the Composer/PHPUnit/WordPress out-of-memory patterns.

How to Remove Empty Values from an Array in PHP

Drop empty, null, or false values from a PHP array with array_filter and the right callback. Includes the '0 gets removed' gotcha, the array_values re-index pattern, multidimensional cleanup, and a performance comparison.

RegEx

Master patterns, unlock possibilities

See all
Complete reference for regex word boundaries: \b and \B zero-width assertions, engine-by-engine support (JS, Python, Java, PCRE, POSIX), Unicode handling, and lookaround alternatives. Worked examples for whole-word replace and search highlighting.

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!

How to Match a Hex Color Code with Regex

Match a hex color code with regex. 3-digit, 6-digit, and 8-digit (alpha) forms. JavaScript / Python / PHP examples, engine notes, common mistakes, a stripped-hash variant.

Humor

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

See all

Who Is Khaby Lame? TikTok's Silent Genius, Explained

Khaby Lame became the world's most-followed TikTok creator without ever uttering a sentence. The man who beat the internet without saying a word, explained: who he is, where he is from, what the hand gesture means, and twenty reasons it worked.

The Day My Password Died

My password showed up in a known breach database at 2 a.m. Here is what happened next, the small casualty I did not see coming, and what to do when yours appears too.

Experiences

Real stories, real insights: Where tech meets life

See all
AI

Tools that think, write, and ship code with you

See all

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

See all
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.

Cheat Sheets

Single-page references for the tools I reach for

See all
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.

Regex Cheat Sheet

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