FIXED: "Add Media" button not working in WordPress
Sometimes after updating WordPress plugins or Themes you may encounter Add Media button on your WordPress website suddenly stops working without any warning or error message. In this situation, you won't be able to add any images and videos in your post. Let's walk though the process how to fix this issue.
What is "Add Media" button?
The "Add Media" button in WordPress is available on the post editor screen that allows you to add media items such as images, videos, and GIFs, into your WordPress post. But sometimes it does not work properly so that users get bothered and cannot add media item to their post or pages.
Likewise all WordPress errors, it does not show you any causes, that’s why you have to find out yourself causes of this error.
Why ‘Add Media’ button stop working?
Often this error is caused by conflicting scripts or style that is loaded by WordPress plugin or theme installed on your WordPress website. However, by default WordPress load all needed script and stylesheets by combining the request.
How to fix WordPress Add Media button not working issue
Add the given below code to your wp-config.php file and fix your error quickly. To add this, you have to edit the wp-config.php file and add the code before ending.
define(‘CONCATENATE_SCRIPTS‘, false );
Once you have added the code, thereafter go to the post edit screen and check the add media button is working as expected or not.
Adding this code is a short-term solution because you have the script due to which the error occurs. You can find the source of the problem easily by using the browser's inspect tool (F12 key). The inspect tool will display you console errors that can access you to the source of conflict.
If you want to fix this problem for the long-term, so you have to apply the basic WordPress troubleshooting tips to check which plugin or theme cause this problem.
From the Admin Area of your WordPress site, you have to deactivate all your WordPress plugins and check whether the add media button working or not, so you can find which of the plugins is causing the error.
Now activate the plugin one-by-one, and check the add media button after activating each plugin. Doing the same will help you to find out which plugin is causing the error. Once you found, you can deactivate or replace it with another one or ask the author of the plugin for help.
If still, you are also facing the problem by deactivating the plugin, means the plugin is not resolving the problem, then you can switch to a default WordPress theme such as twenty-seventeen.
If switching to the default theme fixes the issue for you, then this means your theme is causing the conflict. You can ask the theme author for support or switch to a different WordPress theme.
Alternate solution to make "Add Media" button work again
With the update to WordPress 5.5, a migration tool known as jquery-migrate will no longer be enabled by default. This may be the reason why "Add Media" button is not working.
There's a plugin called "Enable jQuery Migrate Helper", which serves as a temporary solution, enabling the migration script for your site, which also fixes the "Add Media" button is not working issue.
Go to your WordPress Admin Area, browse Plugins - Add New, type Enable jQuery Migrate Helper in plugins' search box, install it and activate. "Add Media" button should be functional now while you can use conflicting plugin too until the developer releases new version.
Published on: 17-08-2018