fbpx

How to Fix Add Media Button Not Working In WordPress

Have you ever had to deal with the issue where your add media button is not working? Frustrating, right. You are logged into your WordPress website, preparing to add some media to a post you are about to publish, then boom! Add media button not working. Unfortunately, while this issue is a common WordPress error, you aren’t given a reason why your add media button is not working.

The issue can be frustrating, especially for beginners, as you are cluelessly running through your site trying to figure out the cause of the error. But don’t lose hope just yet, the error is quite an easy fix, and you can even do it yourself. In this article, I will show you how to fix add media button not working in WordPress.

What is the cause of ‘Add Media Button Not Working’ in WordPress?

The common cause of the problem is scripts or stylesheets conflicts from themes or plugins installed into your WordPress site. WordPress is supposed to load all required scripts and stylesheets on your site by default. Premium themes come with built-in plugins which can create scripts of their own.

JavaScript handles a lot of feature buttons in the WordPress admin area including the Add Media button; this is to improve speed and performance.

If the WordPress post editor using JavaScript to run its Add Media button runs into any other script, this may result in a conflicting script that will stop the JavaScript and prevent the Add Media button from working resulting in the ‘Add media button not working’ error.

How to Fix Add Media Button Not Working In WordPress

How to Fix Add Media Button Not Working In WordPress

There are two ways you can go about fixing the Add media button not working issue.

Through your FTP client or File Manager

A fast way to fix this error is by accessing your WordPress root directory using the FTP client and editing your wp-config.php file.

Related post  HOW TO INSTALL WORDPRESS

Simply download the wp-config.php file from your root directory and open it with a text editor on your device. Next, scroll down to the line that says “That’s all, stop editing! Happy blogging” and add the following line of code just before it.

define(‘CONCATENATE_SCRIPTS’,false);

Save the changes and upload the edited wp-config.php file back to your root directory. When you are done, clear your browser cache and log back into your WordPress site.

The code will tell your WordPress site to load one script at a time instead of combining all the script requests. This way you will avoid running into JavaScript conflict from running multiple scripts.

Note: While your add media button should be working after doing this, this method is just a temporary fix and you will still have to deal with the source of the problem.

Troubleshooting your WordPress Website.

To permanently fix the add media button not working error you need to troubleshoot your website and figure out which script is the cause of the issue. We recommend you run this fix on a staging website before implementing it on your live website.

The first thing to do is deactivate all the plugins on your WordPress website, then go back and check if the Add Media button has been fixed. If the button is fixed, then the ‘Add Media button not working issue is caused by one of your plugins.

Deactivate plugins in wordpress

Now go back and reactivate your plugins one by one, and after each activation check if the Add Media button is still working. This way you will be able to figure out which plugin is the cause of the conflicting script. Once you have figured out the responsible plugin, you can choose to either replace it or contact the plugin developer for assistance.

If after plugins deactivation the issue hasn’t been resolved, you can temporarily change your theme to a default WordPress theme like Twenty Twenty.

Related post  How To Fix WP Site Redirecting Too Many Times

If after the change of theme the Add Media button starts working, then the issue is from your theme. You can contact the theme developers, lay your complaint and ask for help, or you can switch to another theme.

After fixing the problem on your staging site, you can switch to your live site and apply those fixes.

Leave a Reply

%d bloggers like this: