Title: &#8220;WP-Includes&#8221; needed for each excluded script?
Last modified: June 18, 2021

---

# “WP-Includes” needed for each excluded script?

 *  Resolved [nssimpson](https://wordpress.org/support/users/nssimpson/)
 * (@nssimpson)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wp-includes-needed-for-each-excluded-script/)
 * Hi
 * By default these scripts are excluded:
 * wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js
 * Please can you explain why the first two need “wp-includes” but the last one 
   that points to an actual .js file doesn’t? I’ve checked and all three locations
   are within the wp-includes folder on our server.
 * Thanks
 * Nick

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wp-includes-needed-for-each-excluded-script/#post-14570942)
 * `wp-includes/js/dist/` is where all the WordPress blocks (Gutenberg) JS lives
 * `wp-includes/js/tinymce/` is where the “old” HTML editor lives which is sometimes
   used on the frontend (e.g. in specific comments/ forum setups)
 * these are default exclusions as experience shows issues _can_ arise if blocks/
   tinymce are used on the frontend .
 * `js/jquery/jquery.js` (or more recently `js/jquery/jquery.min.js` is jQuery itself,
   quite a number of themes/ plugins expect jQuery to be available early, hence 
   it’s presence in the exclusion list.
 * but feel free to change the list as you see fit 🙂
 * hope this clarifies,
    frank
 *  Thread Starter [nssimpson](https://wordpress.org/support/users/nssimpson/)
 * (@nssimpson)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wp-includes-needed-for-each-excluded-script/#post-14571005)
 * Hi Frank, thanks for your reply. My question is why isn’t the last one:
 * **wp-includes/**js/jquery/jquery.js
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wp-includes-needed-for-each-excluded-script/#post-14571012)
 * it could be, but it does not really matter as both match full path, yours is 
   a full match, the one used in the default exclusions a partial one, but in both
   cases jquery is exluded 🙂
 *  Thread Starter [nssimpson](https://wordpress.org/support/users/nssimpson/)
 * (@nssimpson)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wp-includes-needed-for-each-excluded-script/#post-14571024)
 * I’m sorry to ask but how does /js/jquery/jquery.js match the full path when it’s
   within the wp-includes folder?
 * Cheers
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/wp-includes-needed-for-each-excluded-script/#post-14571037)
 * because the string `/js/jquery/jquery.js` is part of of the string `wp-includes/
   js/jquery/jquery.js` 🙂

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

The topic ‘“WP-Includes” needed for each excluded script?’ 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/)

 * 5 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/wp-includes-needed-for-each-excluded-script/#post-14571037)
 * Status: resolved