Bobcares

Add Media button not working in WordPress – How to resolve

by | Apr 22, 2021

Wondering how to resolve ‘Add Media button not working in WordPress’ ? We can help you with it.

As part of our Server Management Services, we assist our customers with several WordPress queries.

Today, let us see how to fix this error.

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.

 

Solution for Add Media button not working

Today, let us see how our Support Techs resolved the issue.

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.

  • 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.
  • 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.
  • 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 the error still? We are here for you]

 

Conclusion

Today, we saw effective ways our Support Techs employ in order to fix the issue

 

Are you using Docker based apps?

There are proven ways to get even more out of your Docker containers! Let us help you.

Spend your time in growing business and we will take care of Docker Infrastructure for you.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.