Title: Uncaught ReferenceError: wp is not defined
Last modified: February 8, 2022

---

# Uncaught ReferenceError: wp is not defined

 *  Resolved [jidwictut9](https://wordpress.org/support/users/jidwictut9/)
 * (@jidwictut9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-wp-is-not-defined-5/)
 * Hello,
    I have seen that in Chrome Dev Tools the following error is displayed:**
   Uncaught ReferenceError: wp is not defined**
 * The following options are enabled:
    Optimize JavaScript code Not merge but delay
 * When I uncheck **Not merge but delay** the error is gone. But I would like to
   use this function. There seems to be an error or conflict with elementor. I hope
   you can help me.
 * Regards
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Funcaught-referenceerror-wp-is-not-defined-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-wp-is-not-defined-5/#post-15342706)
 * Can you try also activating “defer inline JS” OR add `wp-includes/js` to the 
   comma-separated JS exclusion list?
 *  Thread Starter [jidwictut9](https://wordpress.org/support/users/jidwictut9/)
 * (@jidwictut9)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-wp-is-not-defined-5/#post-15342751)
 * Hello,
 * thanks for the quick reply.
 * If I exclude /wp-includes/js/ the error is fixed. That was it 🙂
    Curious that
   it worked before without excluding it (before I update Elementor/Elementor Pro)
   Thanks a lot.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 4 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-wp-is-not-defined-5/#post-15342778)
 * yeah, any plugin update can change what JS is required I’m afraid. but happy 
   it works now, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂
 * frank

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

The topic ‘Uncaught ReferenceError: wp is not defined’ 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/)

 * 3 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [4 years, 4 months ago](https://wordpress.org/support/topic/uncaught-referenceerror-wp-is-not-defined-5/#post-15342778)
 * Status: resolved