Title: Setting SCRIPT_DEBUG or WP_DEBUG_LOG fixes theme-changing problem.
Last modified: August 30, 2016

---

# Setting SCRIPT_DEBUG or WP_DEBUG_LOG fixes theme-changing problem.

 *  Resolved [SnorkleZ](https://wordpress.org/support/users/snorklez/)
 * (@snorklez)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/setting-script_debug-or-wp_debug_log-fixes-theme-changing-problem/)
 * I have just provisioned a Linode with Nginx and WordPress (first time).
 * Everything works _except_ I cannot change the theme. When I try to do “live preview”
   or “save and activate” I get the spinning busy icon forever. The browser used
   doesn’t matter. Clearing caches has no effect, all plugins are disabled.
 * The javascript console gives these error messages when this problem occurs:
 * > GET [http://(url](http://(url) witheld).com/wp-admin/load-scripts.php?c=1&load%
   > 5B%5D=undersco…e-view,imgareaselect,image-edit,customize-models,customize-views&
   > ver=4.2.2 net::ERR_INCOMPLETE_CHUNKED_ENCODING
   > color-scheme-control.js?ver=20141216:78 Uncaught ReferenceError: wp is not 
   > defined(anonymous function) @ color-scheme-control.js?ver=20141216:78
 * Strangely, setting the WP_DEBUG_LOG or the SCRIPT_DEBUG flag fixes the problem,
   even if WP_DEBUG is set to false.
 * This happens with a vanilla “just downloaded” WordPress.
 * Since I am new to provisioning servers maybe I have something set wrong in my
   PHP or NGINX setup?
 * Thanks for any help or comments

Viewing 1 replies (of 1 total)

 *  Thread Starter [SnorkleZ](https://wordpress.org/support/users/snorklez/)
 * (@snorklez)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/setting-script_debug-or-wp_debug_log-fixes-theme-changing-problem/#post-6304792)
 * I think when WordPress sends stuff minified some of it doesn’t get sent properly
   by Nginx. Turning chunked_transfer_encoding off in Nginx doesn’t fix it.
 * Setting the WP_DEBUG_LOG or SCRIPT_DEBUG flag probably tells WordPress to not
   minify. So I’ll just leave the SCRIPT_DEBUG flag on until I resolve this on Nginx.
 * Since this doesn’t seem to be a WordPress issue I will mark this topic as resolved.

Viewing 1 replies (of 1 total)

The topic ‘Setting SCRIPT_DEBUG or WP_DEBUG_LOG fixes theme-changing problem.’ is
closed to new replies.

## Tags

 * [Hangs](https://wordpress.org/support/topic-tag/hangs/)
 * [theme change](https://wordpress.org/support/topic-tag/theme-change/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [SnorkleZ](https://wordpress.org/support/users/snorklez/)
 * Last activity: [10 years, 10 months ago](https://wordpress.org/support/topic/setting-script_debug-or-wp_debug_log-fixes-theme-changing-problem/#post-6304792)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
