Minify HTML removes unneeded whitespace from the HTML of your pages before they are sent and cached. Pages get a little smaller, so they download faster. The saving is usually modest, because most servers already compress HTML, but it costs nothing per visit once the page is cached.
Available in: Powered Cache (free)
Where to find it: Powered Cache → File Optimization → HTML

How HTML minification works #
Powered Cache minifies the finished HTML of each front-end page, right before it is sent to the browser. Because page caching stores that output, the cached copy is already minified and the work is done only once per page.
Only real HTML pages are processed. Powered Cache skips:
- The WordPress admin, the Customizer preview and REST API requests.
- Requests other than
GET, and responses that are not HTML documents, such as XML sitemaps, feeds androbots.txt. - The editing screens of Elementor, Divi, Beaver Builder, Bricks and Cornerstone, where all file optimizations are switched off.
- All requests while Development Mode is on.
Turn on HTML minification #
- Go to Powered Cache → File Optimization.
- In the HTML group, turn on Minify HTML.
- Optionally turn on HTML DOM Optimization (Optimize HTML output).
- Click Save Settings, then clear the cache so cached pages are rebuilt with minified HTML.
- Open a few pages in a private window and check that they look and work as before.
Settings #
Minify HTML #
Removes unnecessary whitespace from the generated HTML. Default: off. Apply Recommended Settings turns it on, unless Autoptimize, Perfmatters or PhastPress is active.
While HTML DOM Optimization is off, Powered Cache also removes the whitespace between tags and all HTML comments with a simple text pass. Turn on HTML DOM Optimization if a plugin or service relies on HTML comments in your page source.
HTML DOM Optimization #
Shown when Minify HTML is on. Default: off. Apply Recommended Settings turns it on together with Minify HTML.
With this option, the minifier reads the page as an HTML document instead of plain text, which makes its cleanup aware of the page structure. The simple text pass described above is skipped. It is the safer choice for most sites, so keep it on when you use Minify HTML.
Caveats #
- Other optimization plugins: when Autoptimize optimizes HTML too, Powered Cache shows a warning on this setting. Use HTML minification in one plugin only.
- No per-page switch: HTML minification applies to every front-end page. The editor panel has no option to turn it off for a single post.
- Small gain: if your server already sends pages with gzip or Brotli compression, minifying saves only a few kilobytes. It is still safe to keep on.
Troubleshooting #
Spacing between inline elements changed #
Some themes rely on the space between inline elements, such as buttons or menu items placed side by side. Turn on HTML DOM Optimization, clear the cache and check again. If the problem stays, turn Minify HTML off. More checks are in Broken layout after optimization.
Compare with the original page #
To see a page without any Powered Cache processing, add ?nopoweredcache=1 to its URL. See Bypass the cache.
For developers #
Return true from the powered_cache_fo_disable_html_minify filter to skip HTML minification for a request. See the hooks reference.