VP Speed - Replacing the full Bootstrap
Compiling a slim bundle is only half the job. Until you tell VP Speed to replace it, the full Bootstrap your template loads keeps downloading alongside your slim file — so the page actually gets heavier, not lighter. This article explains the replacement option and how VP Speed removes the full Bootstrap no matter how your template loads it.
The problem replacement solves
Your template, or Joomla core, registers the full bootstrap.min.css. The Bootstrap Optimizer adds your slim bundle. Without replacement the browser now downloads both: the original 223 KB file and your slim file. The fix is to stop the full Bootstrap from loading, leaving the slim bundle as the only Bootstrap on the page.
Enabling replacement
On the Plugin tab, switch on Replace full Bootstrap CSS. This option is off by default — a deliberate safety choice, so that simply installing and enabling the plugin can never change how your site looks until you opt in.
Once replacement is on, your slim bundle is the only Bootstrap on the page. If a component your template uses is not in your selection, that part will lose its styling. Review the previous article on choosing components before enabling replacement, and check your key pages afterwards.
How removal works
Templates load Bootstrap in different ways, so VP Speed removes it on three levels to cover them all:
- Web Asset Manager — the modern Joomla way. VP Speed overrides the core
bootstrap.cssasset so it resolves to your slim bundle. Any asset that depends on Bootstrap (a common pattern for icon fonts) keeps its dependency satisfied — it simply points at the slim file now. - Legacy stylesheet API — stylesheets added the older way are detected by URL and removed.
- Rendered HTML — as a final guarantee, any remaining full-Bootstrap
<link>hardcoded directly in the template markup is stripped from the page output. Nothing can slip past this level.
Throughout all three, Bootstrap Icons are never touched — only the full Bootstrap framework CSS is removed.
A real example: vpjoomla.com
On our own site the template loaded the full Bootstrap as a separate file. Before replacement, the render-blocking CSS for the page looked like this:
| Stylesheet | Transferred | Duration |
|---|---|---|
| bootstrap.min.css (full) | 27.5 KB | ~1100 ms |
| VP Speed slim bundle | 4.2 KB | ~560 ms |
| other template CSS | ~8 KB | — |
After switching on replacement, the full bootstrap.min.css disappeared from the page entirely. Only the slim bundle remained, and the page's own render-blocking CSS dropped from about 40 KB to roughly 12 KB — the result the optimizer was meant to deliver.
The transferred sizes above are after gzip; the raw saving is even larger. A minimal grid-and-buttons build can compress to a couple of kilobytes — small enough that the stylesheet stops being a meaningful part of your critical path at all.
A note on Cassiopeia and similar templates
Some templates do not load Bootstrap as a separate file at all — they compile it into one combined stylesheet (Joomla's default Cassiopeia template does this). In that case there is no standalone full Bootstrap to remove, so the replacement option has nothing to strip. Your slim bundle still loads and your JavaScript and caching optimizations still apply; the big CSS saving simply isn't available because the template already bundles everything together.
Replacement delivers the most on templates that load bootstrap.min.css as its own file. To check, view your page source before enabling the plugin and look for a separate Bootstrap stylesheet request.
Verifying the result
After enabling replacement, clear the Joomla cache, reload the front end and view the page source or your browser's network panel. The full bootstrap.min.css should be gone, leaving only your slim bundle from /media/plg_system_vp_speed/css/. Then run the page through PageSpeed Insights and check the render-blocking requests audit — the full Bootstrap should no longer appear there.
Next step
With CSS optimized, the next area is JavaScript: deferring and delaying scripts so they stop holding up the first paint. That is the subject of the next article.