WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How would I go about combining multiple CSS files and concatenating my scripts if they're being enqueued as WordPress recommends? My site is pretty slow and would like to optimize for performance.

share|improve this question

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
share|improve this answer
Wordpress does have this functionality - you can see it combines its library scripts into one js file before sending to browser. The question is why do they not enable this for plugin/theme scripts? – NoBugs Dec 3 '13 at 7:42
Because it would cause to much trouble, WordPress can control the back-end but not a users themes and plugins, so it's then up to the user to do this. – Wyck Dec 3 '13 at 15:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.