You click Add Media or try to insert an image, and nothing happens — the media library won’t open, or the button is dead. It’s almost always a JavaScript conflict rather than anything deeply broken, and it’s fixable.

Rule out a plugin conflict first

A broken button usually means a plugin loaded a script that crashed the page’s JavaScript, and the media uploader depends on that JavaScript. Open your browser’s developer console (F12) and look at the Console tab — a red error naming a specific plugin’s file points straight at the culprit. Deactivate that plugin and test again.

If you can’t tell which one, deactivate all plugins by renaming the plugins folder in File Manager, confirm the button works, then reactivate one at a time.

Force script concatenation off

WordPress sometimes combines admin scripts in a way that fails on certain server setups, breaking the uploader. Add this to wp-config.php to disable concatenation:

define('CONCATENATE_SCRIPTS', false);

This is a known, reliable fix for a dead media button on some hosting configurations.

Switch to a default theme

If plugins aren’t the cause, your theme may be loading a conflicting script. Temporarily switch to a default theme by renaming your active theme’s folder. If the button springs back to life, the theme is the problem.

Clear caches and hard refresh

A stale cached script can leave the button broken even after you’ve fixed the underlying cause. Clear your caching plugin, then do a hard refresh (Ctrl+F5 or Cmd+Shift+R) so the browser loads the current scripts rather than old ones.

Check file permissions on uploads

If the library opens but uploads fail, confirm wp-content/uploads is writable (set to 755). A media button that opens fine but won’t save files is a permissions issue, not a script one.

Update everything

Outdated core, themes or plugins are a common source of script conflicts. Once you’ve identified nothing critical is broken, update everything to current versions — often the conflict was already fixed in a newer release.

Between disabling script concatenation and finding the conflicting plugin, this one nearly always resolves quickly. If the console error points somewhere you can’t place, send us the message and we’ll help decode it.

Was this article helpful to you?

admin

Leave a Reply

You must be logged in to post a comment.