What to do When Add Media Button Doesn’t Work in WordPress?

What to do When Add Media Button Doesn’t Work in WordPress?

WordPress allows you to use images and animation files on your website with ease. These make your website more appealing to visitors. But some users report facing the ‘Add Media’ button, which is used to add media files, stops working. This is a matter of great concern since you won’t be able to add pictures and graphics. In this article, learn how to deal with this problem.

Why Add Media Button Stop working suddenly?

Before fixing the issue, it’s better to learn why the button stops working in the first place.

There are multiple reasons for failure. But the main reason why the button stops working is there exist conflicting scripts that interfere with each other. These may be downloaded by the plugins or themes. Please note that WordPress combines all scripts in the admin area. This is done to improve speed and overall performance.

But such kind of amalgamation may lead to problems. When that happens, the Add Media button (or any other button) loses its functionality. This button is part of the post editor, which uses Javascript. If the plugin’s or theme’s scripts are not designed for Javascript, you get this error.

How to fix the problem?

Now let’s learn how to go about fixing the issue. There are two ways available for you. These are:
  1. Add the required code to wp-config.php file
The fastest way to restore the issue is to add the following code to the wp-config.php file of your WordPress website:

Code:
define(‘CONCATENATE_SCRIPTS’, false );
You need to add the code just above this line - ‘That’s all, stop editing! Happy blogging’.

The code instructs WordPress to load the files independent of one another. So it doesn’t mixes them up in the admin area. So the JavaScript files that power the post editor stay unaffected.
  1. Find the root problem
The first method doesn’t fixes the problem per se. It’s just a remedy for the time being. The conflicting files still exist on your WordPress system. You need to find and remove them to permanently fix this issue.

Here are things you should do:
  • Deactivate all WordPress plugins. Now go back to see if the Add Media button is working as intended. If that’s the case, you should know that one of the plugins is the source of the problem.
  • Now start activating the plugins one after another. After activating each plugin, check the status of the Add Media button. When you activate a particular plugin and the button stops working, you’ve got the culprit.
  • Write to the plugin author regarding the problem and seek assistance. If it isn’t necessary, consider deactivating the plugin.
If plugins are not the problem, you should repeat the process with themes. Find the culprit theme and remove it.

You should also check the Inspect tool to find the source of the problem. If errors are marked, you don’t have to check the plugins or themes one-by-one.

So that’s what you should do when Add Media button stops working in WordPress. For more assistance, contact your hosting provider.
Author
kumkumsharma
Views
3,749
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from kumkumsharma

Top