Title: S&amp;O: 500 Error?
Last modified: July 26, 2019

---

# S&O: 500 Error?

 *  Resolved [justravis](https://wordpress.org/support/users/justravis/)
 * (@justravis)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/)
 * Your assistance would be greatly appreciated.
 * WordPress 5.2.2 & Autoptimize 2.5.1
 * GTMetrix encountered a 500 error when testing the website. When I deactivated
   Autoptimize, GTMetrix tested the website as usual.
 * WP Engine found the errors below in their logs:
    `127 PHP Fatal error: Uncaught
   JSMin_UnterminatedStringException: JSMin: Unterminated String at byte 51: 'W\
   xc9N.N\xf6q\xb6\xd7E\x91\xb0\x84\x98 in /nas/content/live/sunopt/wp-content/plugins/
   autoptimize/classes/external/php/jsmin.php:214\nStack trace:\n#0 /nas/content/
   live/sunopt/wp-content/plugins/autoptimize/classes/external/php/jsmin.php(152):
   JSMin->action(1)\n#1 /nas/content/live/sunopt/wp-content/plugins/autoptimize/
   classes/external/php/jsmin.php(86): JSMin->min()\n#2 /nas/content/live/sunopt/
   wp-content/plugins/autoptimize/classes/autoptimizeSpeedupper.php(38): JSMin::
   minify('\\x1F\\x8B\\x08\\x00\\xB8V8]\\x00\\x03\\xBD\\\\\\vs\\xDB...')\n#3 [internal
   function]: autoptimizeSpeedupper->js_snippetcacher('\\x1F\\x8B\\x08\\x00\\xB8V8]\\
   x00\\x03\\xBD\\\\\\vs\\xDB...', '/nas/content/li...')\n#4 /nas/content/live/sunopt/
   wp-includes/class-wp-hook.php(286): call_user_func_array(Array, Array)\n#5 /nas/
   content/live/sunopt/wp-includes/plugin.php(208): WP_Hook->apply_filters('\\x1F\\
   x8B\\x08\\x00\\xB8V8]\\x00\\x03\\xBD\\\\\\vs\\xDB...', Array)\n#6 /nas/content/
   live/sunopt/wp-content/plugins/autoptimize/ in /nas/content/live/sunopt/wp-content/
   plugins/autoptimize/classes/external/php/jsmin.php on line 214`
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fso-500-error%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/#post-11771668)
 * that’s the JavaScript minifier choking on some malformed JavaScript [@justravis](https://wordpress.org/support/users/justravis/)
 * first thing to do is narrowing down where that malformed JS is located, try one
   of these one at a time:
    * untick “aggregate inline JS” (assuming you had that
   ticked) * adding `wp-content/themes` to the comma-separated JS exclusion list*
   adding `wp-content/plugins` to the comma-separated JS exclusion list
 * once we know in which case the problem does not go away we can try to narrow 
   is further down.
 *  Thread Starter [justravis](https://wordpress.org/support/users/justravis/)
 * (@justravis)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/#post-11771721)
 * I appreciate the QUICK response.
 * I do not have “aggregate inline JS” ticked.
 * I tried excluding those directories 1 by 1, but it did not make a difference.
 * Next steps?
 * THANK YOU!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/#post-11771771)
 * can you try unticking the “minimize non-aggregated CSS/ JS files” option (near
   the bottom of the page)?
 *  Thread Starter [justravis](https://wordpress.org/support/users/justravis/)
 * (@justravis)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/#post-11771942)
 * Unticking the “minimize non-aggregated CSS/ JS files” option did the trick!
 * Should I undo what you suggested in your first post?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/#post-11772424)
 * > Should I undo what you suggested in your first post?
 * try those 3 again and see which one has to stay if any?
 *  Thread Starter [justravis](https://wordpress.org/support/users/justravis/)
 * (@justravis)
 * [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/#post-11779034)
 * Thanks again for the PROMPT response!
 * Best plugin support experience ever!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘S&O: 500 Error?’ 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/)

 * 6 replies
 * 2 participants
 * Last reply from: [justravis](https://wordpress.org/support/users/justravis/)
 * Last activity: [6 years, 9 months ago](https://wordpress.org/support/topic/so-500-error/#post-11779034)
 * Status: resolved