If you’re trying to upload images or files to your WordPress site but the “Add Media” button is not working, you’re not alone. This is a common issue WordPress users face, and it usually happens due to plugin conflicts, JavaScript errors, or outdated WordPress files.
Why Is the Add Media Button Not Working in WordPress?
When you click on the Add Media button in the WordPress editor, a popup (media uploader) should appear. If nothing happens, it’s likely caused by:
- Plugin or theme conflicts – A plugin may be blocking JavaScript or conflicting with the WordPress editor.
- jQuery issues – WordPress relies on jQuery, and if it’s deregistered or replaced incorrectly, the button won’t respond.
- Cached scripts – Browser or WordPress caching plugins may serve outdated JavaScript.
- File permission errors – Incorrect file permissions may prevent WordPress from loading necessary scripts.
- Outdated WordPress core, theme, or plugins – Compatibility issues may break the media uploader.
How to Fix the Add Media Button Not Working in WordPress
Follow these troubleshooting steps one by one until the issue is resolved.
1. Clear Your Browser Cache
Sometimes, cached scripts prevent the Add Media button from loading correctly.
- Clear your browser cache and cookies.
- Try opening your site in incognito mode or another browser.
If it works, the issue is cache-related.
2. Disable All Plugins
The most common cause is a plugin conflict.
- Go to Plugins → Installed Plugins.
- Deactivate all plugins.
- Check if the Add Media button works.
If it does, reactivate plugins one by one to identify the culprit. Once found, replace it with an alternative plugin or contact the developer for support.
3. Switch to a Default WordPress Theme
Sometimes themes load custom scripts that break the editor.
- Switch to a default theme like Twenty Twenty-Five.
- Test the Add Media button again.
If it works, the issue lies in your theme. You may need to update or debug your theme files.
4. Check for jQuery Issues
WordPress requires jQuery to run properly. If it has been deregistered, the Add Media button won’t work.
You can add this code in your theme’s functions.php file to restore jQuery:
function fix_jquery_conflict() {
if (!is_admin()) {
wp_enqueue_script('jquery');
}
}
add_action('wp_enqueue_scripts', 'fix_jquery_conflict');
5. Update WordPress, Themes, and Plugins
Running outdated versions can create compatibility issues.
- Go to Dashboard → Updates.
- Update WordPress core, all plugins, and your active theme.
This often resolves JavaScript and media uploader problems.
6. Increase PHP Memory Limit
Low memory can sometimes block scripts from loading. Edit your wp-config.php file and add this line before “That’s all, stop editing”:
define('WP_MEMORY_LIMIT', '256M');
7. Check File Permissions
Incorrect file permissions may block WordPress from loading media uploader scripts. Use FTP or your hosting file manager and ensure folders are set to 755 and files to 644.