WordPress GuideErrors → The Add Media

Help! The Add Media button in WordPress is not working

Apache HTTP Server — What is Apache Web Server Used for? Learn About Apache Server | Liquid Web

When the Add Media button in WordPress stops working, you’re locked out of one of the most basic parts of editing—adding images and files. It’s frustrating, especially if everything else on your site looks fine.

The good news? It’s usually a small conflict behind the scenes. Let’s walk through the most reliable ways to fix it.

Quick summary

If the Add Media button in WordPress isn’t working, it’s usually caused by a JavaScript conflict—often from a plugin or theme. Start by clearing browser and WordPress caches, deactivating plugins, and switching to a default theme. Updating WordPress, checking file permissions, or adding a script debugging line in wp-config.php can also resolve it.

Why the WordPress Add Media button stops working

The Add Media button relies on JavaScript—specifically jQuery—to open the media uploader modal. When that script doesn’t load or gets blocked, the button appears but doesn’t respond.

Most issues trace back to one of these:

How to fix the Add Media button not working

Start with quick fixes, then move into more advanced troubleshooting if needed.

1. Clear your cache everywhere

Caching can save corrupted or outdated versions of scripts. You’ll need to clear three places:

2. Deactivate all plugins

Plugins often enqueue their own scripts, which may conflict with core WordPress functions.

Once you find the culprit, check for plugin updates or contact the plugin developer.

3. Switch to a default theme

Themes can also interfere, especially if they enqueue custom JavaScript or remove jQuery.

If it starts working, your theme likely needs an update or fix.

4. Check for JavaScript or jQuery errors

Use your browser’s Developer Tools to inspect for errors.

These messages point directly to the broken file or plugin causing the problem.

5. Add a script debugging line to wp-config.php

WordPress loads minified versions of scripts by default. Enabling debug mode loads the full versions, which are more reliable for troubleshooting.

Add this line just above /* That’s all, stop editing! */ in wp-config.php:

define(‘SCRIPT_DEBUG’, true);

Then refresh your editor screen and retest the Add Media button.

6. Check and fix file permissions

Improper permissions in key folders can block WordPress from accessing needed scripts or uploading media.

Make sure:

You can check and fix this using FTP, cPanel File Manager, or your host’s file system browser.

Additional fixes to try

If the basics didn’t work, here are more fixes that often help.

Update everything

Go to Dashboard > Updates and make sure:

Old versions may not work with newer JavaScript behaviors in WordPress.

Regenerate Elementor data and files

If you’re using Elementor, corrupted frontend data can cause editor issues.

Try the Classic Editor plugin

If Gutenberg is having issues, you can restore the classic interface.

This bypasses some of the complexity in the block editor and is especially useful for older themes or setups.

Increase PHP memory limit

Low memory can cause scripts to fail silently.

Add this to your wp-config.php file:

define(‘WP_MEMORY_LIMIT’, ‘256M’);

If that doesn’t work, you may need to adjust the memory limit from your hosting panel or ask your host’s support team to raise it.

Still stuck? Try these advanced fixes

Reinstall core WordPress files

If core files got corrupted or weren’t updated properly:

You can also manually replace the /wp-includes/ and /wp-admin/ folders using fresh files from WordPress.org.

Restore from a backup

If you know the Add Media button was working recently, restoring a backup can save time.

You can restore using:

Make sure to back up your current site before rolling back.

How to prevent it from happening again

You can avoid Add Media issues in the future by following a few best practices:

Additional resources

Diagnosing WordPress errors on your site →

Even more common errors, how to troubleshoot them, and how to solve them

How to fix the HTTP error when uploading images to WordPress →

Find out how to fix the WordPress HTTP error when uploading images and get your media library working smoothly again.

What is managed WordPress hosting? →

What it means, what it includes, and how to decide if it’s right for you

Haritha Jacob is a knowledgeable System Engineer with extensive experience in resolving costumers’ complaints and issues. She has experience with various programming languages and operating systems, enterprise backup and recovery procedures, system performance-monitoring tools, and more.