wordpress
Technical notes on web development, DevOps, and AI integration.
3 articles
- 09:55backend
Replacing WordPress database URLs with WP-CLI, not raw SQL
WP_HOME only fools new pages; old URLs live in the database. WP-CLI search-replace with dry-run and skip-columns=guid is the fix.
TL;DR: Moving a WordPress production dump locally means changing WP_HOME and WP_SITEURL won't fix URLs already stored across posts, meta, and serialized options. Raw SQL REPLACE() is risky because it breaks PHP serialized length prefixes and can overflow column limits. Instead, use wp search-replace with a --dry-run first, always skipping the guid column since those permalinks must never change.
#wordpress#wp-cli#php - 08:10devops
Reviving an Old WordPress Site in Docker: The 301 Trap
Containers healthy, browser dragged to production. Three first-run Docker mechanisms skip old volumes silently, and wp_options holds one more surprise.
TL;DR: Reviving an old WordPress site in Docker, I got redirected to production because stale URLs were baked into wp_options. Docker's first-run scripts silently skip work when old volumes are attached, so restore the database explicitly and fix URLs directly. Scary-looking MariaDB warnings are often harmless; watch the logs patiently before assuming anything is broken.
#docker#wordpress#mariadb - 22:24devops
WordPress Full vs View: Two Git Repos, Two Different Jobs
One WordPress install, two Git repos: a full Forgejo repo for recovery, a GitHub view repo carrying only source I wrote myself.
#wordpress#git#github