◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Errors → The Add Media
Help! The Add Media button in WordPress is not working
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:
- A plugin or theme loading a broken or conflicting script
- Caching plugins or a server cache delivering outdated files
- Missing or incorrectly loaded JavaScript dependencies
- File permission or memory issues on the server
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:
- Browser cache: Use Ctrl+Shift+R (Windows) or Cmd+Shift+R (Mac) to force a hard refresh.
- WordPress cache: If you use a caching plugin (like WP Rocket or W3 Total Cache), clear its cache from the WordPress dashboard.
- Server cache: Some hosts like Liquid Web or Nexcess use server-side caching. Clear it from your hosting panel or contact support.
2. Deactivate all plugins
Plugins often enqueue their own scripts, which may conflict with core WordPress functions.
- Go to Plugins > Installed Plugins.
- Select all and deactivate them.
- Try the Add Media button again.
- If it works, reactivate plugins one by one until the issue returns.
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.
- Go to Appearance > Themes.
- Activate a default theme like Twenty Twenty-Four.
- Test the Add Media button.
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.
- Right-click on your page and choose Inspect.
- Go to the Console tab.
- Look for red error messages, especially ones like:
- Uncaught TypeError
- jQuery is not defined
- Uncaught TypeError
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:
- Files are set to 644
- Folders are set to 755
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:
- WordPress core is up to date
- All plugins and themes are current
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.
- Go to Elementor > Tools.
- Click Regenerate Files & Data.
- Click Sync Library.
- Reload your post editor and test the button.
Try the Classic Editor plugin
If Gutenberg is having issues, you can restore the classic interface.
- Install and activate the Classic Editor plugin.
- Open a post or page and test the Add Media button.
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:
- Go to Dashboard > Updates
- Click Reinstall Now
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:
- Your host’s backup tool
- Plugins like UpdraftPlus, Jetpack Backup, or BlogVault
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:
- Update regularly. Old plugins or themes often cause JavaScript conflicts.
- Avoid plugin bloat. Using too many similar plugins (e.g., multiple visual builders) can create conflicts.
- Use a staging site. Test updates and changes on a staging version of your site before applying them live.
- Choose reliable plugins and themes. Stick to tools with strong reviews and ongoing support.
Next steps for fixing the Add Media button in WordPress
When the Add Media button breaks, it’s usually a sign that a script is clashing with WordPress. Plugin conflicts and caching are the most common causes.
Start by clearing caches and deactivating plugins, then move through updates, permission checks, and advanced fixes like SCRIPT_DEBUG. If you’re still stuck, restoring a backup or reaching out to your host might save hours of frustration.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance either? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
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.