WordPress issue "Add Media button not working" - Fix it Now ?

When it comes to your website, you want to be able to add images to your website.

When the media button isn't working or is not showing on the posts or pages editing screens, then you need to find a fix.
Add Media button not working in WordPress generally happens when script conflicts among your themes and plugins.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to resolve related WordPress errors.
In this context, we shall look into how to fix this WordPress error.

Nature of Add Media button not working in WordPress

Recently one of our customers reported that the 'Add Media' button on their WordPress site has suddenly stopped working.
This problem does not display any error or warning which leaves users clueless about why their 'Add Media' button is not working.
Let us see cause for this issue.
Generally, this issue caused by conflicting scripts or stylesheets loaded by WordPress plugins or themes installed on our site.
WordPress combines all scripts inside the WordPress admin area to improve performance and speed.
A plugin or theme's script can disrupt this which will make other code in the script stop working.
The WordPress post editor uses JavaScript for all buttons on the screen including the add media button.
A conflict can stop JavaScript from working which will disable the 'Add Media' button.

How to fix WordPress error "Add Media button not working" ?

1. First and foremost, quick fix is to add the following code to wp-config.php file.
We can do this by editing wp-config.php file and adding this code just before the line that says 'That's all, stop editing! Happy blogging':

define(‘CONCATENATE_SCRIPTS’, false );

This code simply tells WordPress to load each script separately which helps avoiding a JavaScript conflict with buggy scripts and the core WordPress features.
After that, visit post edit screen to see if the add media button is working as expected.

2. Secondly, an easier way to find the source of the problem is by using the inspect tool. It will show console errors which can lead to the source of the conflict.
We need to perform the basic WordPress troubleshooting tips to figure out which plugin or theme may be causing the issue.
Otherwise, take the necessary backup so that we can revert if required.
i. Initially, deactivate all WordPress plugins and then check if it fixed the 'Add Media' button. If it does, then this means one of the plugins was causing the issue.
ii. Then, activate the plugins one-by-one and after activating a plugin, check the 'Add Media' button. This will help to find out which plugin is causing the issue.

After we find the culprit plugin, we can replace it with another plugin or ask plugin author for help.
iii. If switching to the default theme fixes the issue, then this means the theme is causing the conflict.
We can ask theme author for support or switch to a different WordPress theme.
Once we find the source of the problem on staging site, then we can apply the fix on live WordPress site.

[Stuck with fixing any WordPress error? We are here for you. ]


This article covers how to Fix WordPress Add Media Button Not Working.
The main reason behind this error is usually custom scripts not working correctly, plugins, or themes.
You can pinpoint the cause of your woes using your browser's Inspect -> Console.
The console tool highlights script errors that can help you to identify where the problem lies.

To fix this WordPress error:

1. That aside, start by deactivating all of your plugins.
2. Then check if the Add Media button is working.
3. If the button is working, then it is obvious one of your plugin is causing the script conflict.
4. Next, reactivate the plugins one by one, and check the Add Media button after each activation.
5. When you find the responsible plugin, contact the developer for help or find a replacement.
6. If the problem persists after deactivating all plugins, you need to ensure you've cleared your caches first and then test if your theme is the cause of the WordPress Add Media button not working.
7. Just activate a default WordPress theme such as Twenty Seventeen and then check if the problem is gone.
If the button works, the issue here is your theme.