Fix Add Media Button Not Working in WordPress

If your ‘Add Media’ button has unexpectedly stopped working on your WordPress website and you are oblivious about the reason and the solution, we are here to help you. To resolve the error of the Add Media button not working in WordPress, you can go through this article. In this article, we have consolidated the most popular solutions for this type of WordPress error.

Causes of the Add Media Button Not Working Error in WordPress:

WordPress plugins or themes might load scripts or stylesheets. These are the plugins that are installed on your WordPress website. A conflict caused by these scripts or stylesheets may lead to the error of Add Media button not working in WordPress. WordPress creates a combination of the requests in the WordPress admin area to load all the necessary scripts and stylesheets. This enhances the performance and speed.

Javascript is the language utilised by the post editor of WordPress to display the buttons. This also includes the Add Media button. When there is a hindrance in Javascript caused because of a conflict, the ‘Add Media’ button deactivates and stops working.

We hope that you are now clear on the reasons behind the error of Add Media button not working in WordPress. Moving ahead, we will look into the various available solutions to fix this error. These are the fixes that we recommend for you. We hope that it will be of some help to you in resolving the error.

Resolving the Issue of Add Media Button Not Working in WordPress:

To resolve the error of Add Media button not working in WordPress, you can follow the below steps:

  • Go to your wp-config.php file.
  • Select the option to edit the wp-config.php file.
  • Add the below code in your wp-config.php file, just before the line that says ‘That’s all, stop editing! Happy blogging.

define(‘CONCATENATE_SCRIPTS’, false );

  • Now the scripts will be loaded individually. This is to prevent any future conflicts between JavaScript, buggy scripts and the core WordPress features.
  • Reconnect to your WordPress website.
  • Visit the post edit screen.
  • The Add Media button should now be working properly.

Now that the problem is resolved, we will look for a more sustainable solution for this issue. The above solution is a temporary fix. This is because there is a conflict-causing script still present that needs your attention.

To detect and fix the source of the error, you can follow the below steps:

  • Open the inspect tool.
  • A list of console errors will appear.
  • Here, you can try to detect the source of the conflict.
  • With the required troubleshooting, you will be able to detect the error-causing plugin or theme.
  • But first, we recommend you create a staging site.
  • Use the staging site for troubleshooting instead of a live site.
  • Go to your staging site.
  • Deactivate all your WordPress plugins.

  • Check if the ‘Add Media’ button is fixed.
  • If the ‘Add Media’ button is fixed, you will have to detect the error-causing plugin,
  • Start activating the plugins one by one.
  • After activating each plugin, check if the error reappears.
  • Once you find out the error-resolving plugin, you can remove this plugin and replace it with some other plugin.
  • You can also contact the author of this plugin for a fix.
  • If the error is not caused by the plugins, the next check is for the theme.
  • Temporarily switch to a default WordPress theme.

  • If this fixes the issue for you, then your theme is the cause of the error.
  • Switch to a different theme.
  • Or you can also ask your theme author for support.
  • Once you detect and fix the source of the error on your staging site, you can utilise the same solution on your live WordPress site.
Please follow and like us:
Content Protection by DMCA.com