Reaching for a GUI to answer one question about a database means finding credentials, a tunnel and a browser, when the site’s own configuration already has all of…
A maintenance task run through wp eval-file has no arguments, no help, no progress and no exit code worth checking. Registering it as a command costs about ten…
A one-off maintenance script usually gets written as a file and run with wp eval-file, which works until it needs to define a class or register a command…
A command iterating every post accumulates objects in the query cache and the object cache, so a loop that works over 10,000 rows fails over 200,000 — and…
On a single site WP-CLI knows which site it is. On multisite it does not, so every command runs against the network’s main site unless told otherwise —…
Running a REPLACE() over the database to change a domain looks like it works, until a widget disappears or a theme setting resets. PHP serialised strings encode their…