acorn-prettify: Acorn Prettify: The WordPress Cleanup Tool That Thinks Like Laravel

A deep dive into how Roots turned front-end bloat removal into a modular, DOM-aware package for Acorn sites.

8 min read • View on GitHub • More from roots

A cluttered WordPress head section is being sorted inside a mechanical workshop. Messy tags, emoji scripts, generator metadata, and URL fragments spill from one side while the other side produces clean package-like output and tidy search paths. The scene explains that this project replaces ad hoc cleanup with structured, Acorn-native behavior.
Acorn Prettify turns WordPress cleanup into a system, not a pile of hooks.
Key Takeaways

Acorn Prettify is easiest to understand as a design decision, not a feature bundle. It takes a messy WordPress job, stripping bloat from front-end output, and gives it the shape of a Laravel package.

WordPress cleanup, but as a package system

That shape matters. Instead of dumping behavior into a theme file full of hooks, Acorn Prettify organizes cleanup into modules managed by a service provider and driven by config/prettify.php.

The package reads configuration once, then hands each module only the work it owns.

// Conceptually, the package flow looks like this:

$modules = collect(config('prettify.modules'));

foreach ($modules as $moduleClass => $moduleConfig) {
    app($moduleClass, ['config' => $moduleConfig])->register();
}