Title: Autoptimize not concatenating CSS or JavaScript
Last modified: February 25, 2018

---

# Autoptimize not concatenating CSS or JavaScript

 *  [zetland](https://wordpress.org/support/users/zetland/)
 * (@zetland)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/)
 * Hey Frank,
 * Thanks for the excellent plugin and all your help here. I’ve been using Autoptimize
   for a while now and it’s been fine with my other sites, but I’ve now got one 
   that isn’t complying. I have optimize HTML, CSS and JavaScript all ticked, but
   it’s not concatenating CSS or JS. Do you know of something that could block this(
   plugin or wp-config.php code or anything else)? I’ve been toying around with 
   my setup but can’t get it to play ball so far…
 * Thanks,
 * James
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fautoptimize-not-concatenating-css-or-javascript%2Fpage%2F3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 31 through 36 (of 36 total)

[←](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/?output_format=md)
[2](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/2/?output_format=md)
3

 *  Thread Starter [zetland](https://wordpress.org/support/users/zetland/)
 * (@zetland)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/3/#post-10249195)
 * Could this maybe be a clue? From my wp-config file:
 *     ```
       //Relative URLs for swapping across app service deployment slots 
       define('WP_HOME','https://vocularapp.com');
       define('WP_SITEURL','https://vocularapp.com');
       define('WP_CONTENT_URL', '/wp-content');
       define('DOMAIN_CURRENT_SITE', filter_input(INPUT_SERVER, 'HTTP_HOST', FILTER_SANITIZE_STRING));
       ```
   
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/3/#post-10249207)
 * the first 3 are normal at first sight, but the last one is a mystery to me. maybe
   try commenting it?
 *  Thread Starter [zetland](https://wordpress.org/support/users/zetland/)
 * (@zetland)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/3/#post-10249435)
 * Think I’ve got it Frank!
 * Basically I changed this line:
 * `define('WP_CONTENT_URL', '/wp-content');`
 * to hard-code in my url:
 * `define('WP_CONTENT_URL', 'https://vocularapp.com/wp-content');`
 * Now it’s concatenated all these files. The only thing is that my HTML load time
   has shot up massively, like from 300 ms to 8000 ms. Any idea why this could be?
 * James
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/3/#post-10249555)
 * > Think I’ve got it Frank!
 * great!
 * > define(‘WP_CONTENT_URL’, ‘[https://vocularapp.com/wp-content&#8217](https://vocularapp.com/wp-content&#8217););
 * good catch. you should even be able to remove (or comment) that line, because
   [https://vocularapp.com/wp-content](https://vocularapp.com/wp-content) would 
   be the default anyway.
 * > The only thing is that my HTML load time has shot up massively, like from 300
   > ms to 8000 ms. Any idea why this could be?
 * page cache being re-built I would guess?
 *  Thread Starter [zetland](https://wordpress.org/support/users/zetland/)
 * (@zetland)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/3/#post-10263587)
 * Looks like you were right. One last thing, I’ve noticed that my AO files often
   take a long time to load (usually more than 1000ms). Anything I can do to reduce
   this a bit? I’ll mark this as resolved after that.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/3/#post-10263672)
 * > One last thing, I’ve noticed that my AO files often take a long time to load(
   > usually more than 1000ms). Anything I can do to reduce this a bit? I’ll mark
   > this as resolved after that.
 * Did some tests (see [https://www.webpagetest.org/result/180509_AK_c3848c63b2e3b1566028076100d02f2c/](https://www.webpagetest.org/result/180509_AK_c3848c63b2e3b1566028076100d02f2c/)
   and [https://www.webpagetest.org/result/180509_K6_324f47e96d13308f9f570ff73b6b2e35/](https://www.webpagetest.org/result/180509_K6_324f47e96d13308f9f570ff73b6b2e35/))
   and see they’re fast most of the times and sometimes (the very first time) … 
   not so fast, with a long time to first byte.
 * Now the problem is that these are simply static files (.css and .js) and that
   at that point there’s nothing AO can do to speed up delivery. It _seems_ that
   IIS takes more time (the TTFB) the first time, maybe putting it in an internal
   cache of some kind? I’m afraid you’re going to need an IIS-specialist to help
   you with that particular problem.
 * One workaround however could be to go the “critical css”-way (“inline & defer
   optoin in AO, see [FAQ](https://wordpress.org/plugins/autoptimize/faq) for info
   + optionally [the new “criticalcss.com power-up”](https://wordpress.org/plugins/autoptimize-criticalcss/)),
   where the rendering of the page isn’t slowed down by slow(er) loading CSS?
 * hope this helps (at least a bit),
    frank

Viewing 6 replies - 31 through 36 (of 36 total)

[←](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/2/?output_format=md)
[1](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/?output_format=md)
[2](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/2/?output_format=md)
3

The topic ‘Autoptimize not concatenating CSS or JavaScript’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [concatenation](https://wordpress.org/support/topic-tag/concatenation/)
 * [css](https://wordpress.org/support/topic-tag/css/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [js](https://wordpress.org/support/topic-tag/js/)

 * 36 replies
 * 3 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/autoptimize-not-concatenating-css-or-javascript/page/3/#post-10263672)
 * Status: not resolved