Debug WordPress Scripts

1 minute read

Let's say you have been looking at the many JavaScript scripts that WP loads and you would like to stop some from loading to help speed up your site.

Now, this obviously could cause your site to not perform how it should, so it would be handy to see any errors when you stop a script from loading.

Display JavaScript errors

If you add the following command to the wp-config.php file it will show all script errors and help you to identify the scripts you need.

Just remember to remove it after you have finished!

define(‘SCRIPT_DEBUG’, true);