Title: wp_enqueue_script Error
Last modified: November 26, 2022

---

# wp_enqueue_script Error

 *  [l_tilford](https://wordpress.org/support/users/l_tilford/)
 * (@l_tilford)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/wp_enqueue_script-error-2/)
 * Hi Guys,
 * Off and on poster here so forgive me if I got this question in the wrong forum.
   Anyways, when going through my client’s debug log I came across the following
   error message:
 * `[25-Nov-2022 22:25:05 UTC] PHP Notice: Function wp_enqueue_script was called
   <strong>incorrectly</strong>. Scripts and styles should not be registered or 
   enqueued until the <code>wp_enqueue_scripts</code>, <code>admin_enqueue_scripts
   </code>, or <code>login_enqueue_scripts</code> hooks.`
 * With it mentioning a line reference at:
 * `/public_html/wp-includes/functions.php on line 5835`
 * I was wondering if anyone can give me an idea of what this warning means?
 * Thanks,

Viewing 1 replies (of 1 total)

 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/wp_enqueue_script-error-2/#post-16235897)
 * That line processes all functions, not just core, but plugins and themes as well.
 * Please attempt to deactivate all plugins and switch to the default Twenty Twenty-
   One theme. If the problem goes away, re-activate them one by one to identify 
   the source of the problem.
 * If you can install plugins, install [Health Check](https://wordpress.org/plugins/health-check/).
   On the troubleshooting tab, you can click the button to deactivate all plugins
   and change the theme for you while you’re still logged in **without affecting
   normal visitors to your site**.

Viewing 1 replies (of 1 total)

The topic ‘wp_enqueue_script Error’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [James Huff](https://wordpress.org/support/users/macmanx/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/wp_enqueue_script-error-2/#post-16235897)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
