Site icon Dhanendran's Blog

Local Dev Toolkit: disk cleanup and debug tools, built into Local

If you build WordPress sites in Local, you already know the two small frictions that never quite go away. Local sites quietly balloon in size — caches, transients, post revisions, an uploads folder that never shrinks — and every time you need to debug something you’re back in wp-config.php flipping WP_DEBUG on, then digging through wp-content/debug.log by hand, then remembering to turn it all off again.

Local Dev Toolkit is a free add-on that puts both of those jobs one click away, per site, right inside Local.

Two tabs, no configuration

Once installed, it adds a Dev Toolkit item to any site’s Tools menu. There’s nothing to set up — it works against whichever site you’re viewing.

Cleanup

The Cleanup tab opens with a live disk-usage breakdown: total site size, plus uploads, database, cache, and debug.log broken out separately, so you can see at a glance where the space actually went.

Below that is a set of one-click tidy actions, each reporting exactly what it did:

These are the same things you’d normally do by hand with a string of WP-CLI commands — now they’re buttons, and you get a count of what was removed.

Debug & Logs

The Debug tab turns the usual wp-config.php dance into toggles. Flip WP_DEBUGWP_DEBUG_LOGWP_DEBUG_DISPLAYSCRIPT_DEBUG, or SAVEQUERIES on and off — the changes are written safely via wp config set, so there’s no hand-editing and no risk of fat-fingering a constant.

From the same tab you can install and activate Query Monitor in one click, and read your debug.log inline — it tails the last 128 KB and gives you a Clear button when it’s served its purpose.

How it works

Under the hood it leans on tools Local already ships. Every action routes through Local’s bundled WP-CLI against the selected site, and the disk and log readouts come straight from the site’s files. That keeps the add-on small and means it behaves exactly like the commands you’d run yourself — no magic, no separate database, nothing phoning home.

A couple of practical notes: the site needs to be running for anything that touches the database (the cleanup actions, DB size, and the Query Monitor install). The disk sizes, the debug-constant toggles, and the log viewer all work whether the site is running or stopped.

Get it

Local Dev Toolkit is open source and free on GitHub:

github.com/dhanendran/local-dev-toolkit

Clone it into Local’s add-ons folder, run yarn install && yarn build, restart Local, and you’ll find Dev Toolkit under any site’s Tools menu.

Exit mobile version