How to combine multiple CSS files and concatenate JavaScripts if WordPress recommends enqueuing them?

WordPress doesn’t really offer this functionality. You basically grab the array of enqueued scripts + styles and minify & concatenating them before they are output (using 3rd party script), of course you would want to cache this as well. This is quite complicated so I suggest instead:

  1. There are several plugins on wordpress.org that do this, just search for “minify”.
  2. Do this on the server side with something like mod_pagespeed
  3. Do this on your side with something like YUI

Leave a Comment