WordPress Add Media button not working: How to fix it quickly

We know the frustration. You are busy preparing a post to publish, so you decide to add some media, but the WordPress Add Media button in the classic editor doesn’t work. This problem can be frustrating because you don’t know what is wrong, and your workflow bears the brunt of it all.

In this tutorial, we’ll show you exactly how to fix Add Media button not working. Let’s dive right in to solve this issue and get you back to publishing your post.

Download all in one WordPress cheat sheet

Cause of the Add Media button not working

The most common reason the Add Media button doesn’t work is script conflicts in WordPress themes or plugins. JavaScript powers many WordPress admin features, including the Add Media button. When its script conflicts with another, the button stops working.

Now, let’s troubleshoot and fix the Add Media button not working in WordPress.

How to fix WordPress Add Media Button not working

Using the File Manager or an FTP client, access the root directory of WordPress and edit the wp-config.php file.

Next, add the following code just before the line that says, “That’s all, stop editing! Happy blogging.”

define('CONCATENATE_SCRIPTS', false);

Save the changes to your wp-config.php file.

Then, log out of your WordPress site. We also recommend clearing your WordPress cache.

Finally, log back into your WordPress admin and check if the Add Media button is working.

The above code simply tells WordPress to load each script individually instead of combining the requests, which is what WordPress does by default. This minimizes the chances of running into conflicts.

While this code is your best chance of fixing the Add Media button, it is not a permanent solution since the problem indicates you have conflicting scripts on your site, something you obviously want to fix.

Troubleshooting the cause of WordPress Add Media Button not working

Now, let us find the root of the script conflict so you can eliminate the problem once and for all. We recommend doing this on a WordPress staging environment first instead of the live one.

You can pinpoint the cause by right-clicking on the classic editor and going to Inspect → Console using your browser. The console tool highlights script errors that can help you identify the problem.

Chrome Console

That aside, start by deactivating all of your plugins. Then, check if the Add Media button is working. If it is, then it is obvious that one of your plugins is causing the script conflict.

Next, reactivate the plugins individually and check the Add Media button after each activation. When you find the plugin that is responsible, contact the developer for help or find a replacement.

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.

Just activate a default WordPress theme and then check if the problem is gone. If the button works, the issue here is your theme. Contact the theme architect for support or change to another theme. If you know your way around code, you can even eliminate the conflict by editing your theme’s files.

When you find the cause of the problem on your staging site, you can go ahead and implement the fix on your live WordPress site.

Conclusion

Usually, the Add Media button breaks due to script conflict somewhere on your website. The line of code added to wp-config.php we shared earlier should work as a quick fix.

We highly recommend updating your WordPress site so that you can get rid of old code and scripts that might cause conflicts.

Additionally, remember that your cache might mislead you into thinking you have a problem, so it’s vital to clear your cache before and after trying our suggested solutions.

Author
The author

Freddy M.

Freddy is a WordPress theme reviewer at WP Theme Raves, a published WordPress blogger, web dev and founder of Vista Media Enterprises – an online business dedicated to WordPress users looking to boost conversion rates through content marketing. He shares his wealth of experience here.