Is the ‘Add Media’ button not working in your WordPress classic editor?
Recently, one of our readers reported that the ‘Add Media’ button had suddenly stopped working in their classic editor. This problem does not display any error or warnings, which leaves users clueless about why their ‘Add Media’ button is broken.
In this article, we will show you how to easily fix the ‘Add Media’ button not working issue in WordPress.
What Causes the WordPress ‘Add Media’ Button to Stop Working?
The ‘Add Media’ button in the classic WordPress editor may stop working due to conflicts in scripts or styles in your plugins or themes on your site.
The default behavior of WordPress is to combine all the required scripts and stylesheets and load them at the same time. This is usually done in the WordPress admin area to improve performance and speed.
That being said, let’s take a look at how to troubleshoot and fix the ‘Add Media’ button not working in WordPress. You can use the quick links below to skip to a specific method:
Method 1: Fix ‘Add Media’ Button Not Working by Adding Code to wp.config.php
The quick fix is to add the following code to your wp-config.php file. You can do this by editing the 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 );
After you have added the code, go ahead and visit the post edit screen to see if the ‘Add Media’ button is now working on your WordPress blog.
Note: Adding this code is not a proper long-term solution because you still have a script that is causing the issue. For this reason, we recommend trying this next method as well.
Method 2: Fix ‘Add Media’ Button Not Working by Troubleshooting Your Theme or Plugin
If you want a long-term fix for this issue, then you need to perform some basic WordPress troubleshooting tips to figure out which plugin or theme may be causing the issue.
We strongly recommend that you do this on your staging site instead of a live site. Here’s a step-by-step guide on how to create a WordPress staging site.
One way to find the source of the problem is by using the Inspect tool on the classic editor page. It will show you console errors, which can lead you to the source of the conflict.
Another way is to start by deactivating all your WordPress plugins and then seeing if this fixes the ‘Add Media’ button. If so, then this means one of the plugins was causing the issue.
For more details, you can see our guide on how to deactivate WordPress plugins.
You can now activate the plugins one by one, and after activating a plugin, just check the ‘Add Media’ button. This will help you find out which plugin is causing the issue.
After you find the problem plugin, you can replace it with another plugin or ask the plugin author for help.
If deactivating plugins doesn’t solve the issue, then the next step is to temporarily switch to a default WordPress theme like Twenty Twenty-One or Twenty Twenty-Three.
If switching to the default theme fixes the issue for you, then this means your theme is causing the conflict. You can then ask the theme author for support or switch to a different WordPress theme.
Once you find the source of the problem on your staging site, then you can apply the fix to your live WordPress website.
We hope this article helped you learn how to fix the ‘Add Media’ button not working issue in WordPress. You may also want to see our list of the most common WordPress errors and how to fix them and our expert picks for the best WordPress plugins for managing images.