How to Fix the Add Media Button Not Working in WordPress


The causes which make the WordPress ‘Add Media’ button to stop working.

This is the problem which comes because of the conflicting scripts or the stylesheets loaded by the WordPress plugins or the themes installed on the website. Here the default behavior of WordPress is in loading all the required scripts as well as the stylesheets by combining the requests.

This step is usually performed through the WordPress admin area for improving the performance as well as the speed. Here the WordPress post editor uses the JavaScript for all the buttons on the screen which includes the add media button. This conflict can stop the JavaScript from working which will disable the add media button.






Fixing the Add Media Button Not Working Issue in WordPress

 

The best feature is by adding the following code in the wp-config.php file. You will be able to perform this by editing the wp-config.php file and then adding this code just before the line which says ‘That’s all, stop editing! Happy blogging’.

define('CONCATENATE_SCRIPTS', false );

This code will simply be telling the WordPress in loading each of the scripts separately which will help in avoiding the JavaScript conflict with the buggy scripts and the core WordPress feature. Once the code has been added, you can go ahead and visit post edit screen to check if the add media button is working according to your need.

 

One should remember that adding this code is not the long-term solution as you will be having the script which is causing the issue. The easiest way of finding the source of the problem is by using the inspect tool. This will be showing the console errors which will lead to the source of the conflict.

If you are looking to fix this issue for the long term then you will be required to perform the basic WordPress troubleshooting tips for figuring out which plugin or the theme that may be causing the issue.

 

It is performed to perform this step on a staging website instead of a live website. In our WordPress hosting service, we offer a 1 click staging functionality.

 

On the staging website you will be required to start by deactivation of all the WordPress plugins and then be checking it if the ‘Add Media’ button is fixed. If it is fixed then it would mean that one of the plugins was causing the issue.

 

You will now have to activate the plugins one by one and after activating a plugin you need to check the ‘Add Media’ button. This will help in finding out which plugin is causing the issue. Once you are able to find the culprit you will be able to replace it with another plugin.

 

If the deactivating plugins are not able to solve the problems then the next step would be to temporarily switch to a default WordPress theme like Twenty Seventeen.

 

If the switching to the default theme is able to fix the issue. Then this would mean that the theme is causing the conflict. There is an option to ask the theme author to switch to a different WordPress theme. Once you are able to find the source of the problem on the staging site, then you will be able to apply the fix the WordPress website in a WordPress Hosting Service.