A WordPress front-end page that “works” can have a console full of errors that no one sees. The page renders, the user scrolls, nothing visibly breaks — but the contact form doesn’t submit, the slider doesn’t slide, the menu doesn’t open on mobile. Each silent error has a source, and tracing it back to the plugin or theme is mechanical once you know where to look.
What’s happening
Browser console errors during a WordPress page load fall into four categories: JS files that 404 (a plugin enqueued a script from a non-existent path), JS files that load but error on parse (syntax error, conflict with another script), runtime errors inside loaded scripts (undefined variables, missing dependencies), and CSP or CORS violations (a script loaded from a source the page’s policy disallows).
Each category has a different fingerprint in the console. A 404 shows up in the Network tab too, in red. A parse error shows up as Uncaught SyntaxError near the top of the console. A runtime error has a stack trace pointing into the file that errored. A CSP violation has a distinct message format with the directive name and the blocked URL.
How to verify
In Chrome DevTools:
# F12, then:
# - Console tab: read every error from page load
# - Network tab: filter by JS, look for 404s in red
# - Sources tab: navigate to wp-content/plugins/...
# - Application tab: check Service Workers, sometimes the cause
From the command line:
curl -s https://example.com/ | grep -oE 'src="[^"]+\.js[^"]*"' | sort -u
# Then for each:
curl -I https://example.com/path/to/script.js
The script that 404s in the page source but enqueues anyway is your starting point.
The fix
- Read the file path in every console error. The error always includes a file URL. That URL is under
wp-content/themes/{theme}orwp-content/plugins/{plugin}. Whoever owns that directory owns the error. - Check for
wp_enqueue_scriptwith wrong path.wp eval 'global $wp_scripts; var_dump($wp_scripts->registered);'lists every enqueued script. A registered script with a path that 404s is misconfigured. - Check jQuery version conflicts. WordPress ships its own jQuery. A plugin loading a second jQuery breaks both. Search for
jquery.min.jsoutsidewp-includes/.$ is not definedor$.fn.foo is not a functionare the symptoms. - Check dependency arrays.
wp_enqueue_script('my-script', ..., array('jquery'))declares jQuery as a dependency. Missing dependency means the script runs before its dependency loads. - Check for
deferorasyncordering issues. A plugin that addsdeferto a script that another expects to be synchronous breaks the chain. Use thescript_loader_tagfilter audit. - For CSP violations, audit the meta or header CSP. A
Content-Security-Policywithscript-src 'self'blocks every inline script and third-party CDN. Reading the violation message tells you which directive blocked which URL.
For sites where front-end interactions need to be reliable across plugin updates, Stack Harbor builds an automated console-error baseline as part of enterprise WordPress monitoring. For a console audit, book a consult.