How to Fix Add Media Button Not Working in WordPress

WordPress is becoming advanced day by day but there are some technical failures that keep occurring every now and then. Among those common issues is the add media button not working issue. The worst part that users feel so much frustrated about is that there is no warning or notification why the button isn’t functioning.

No matter how much the issue of add media button not working in WordPress looks complicated, there is an easy solution to remove this issue on your own. This post lets you learn about it all; the reasons and the fix to this WordPress issue.

Here’s how to fix add media button not working in WordPress. But before that, let’s check out the reasons why it happens in the first place.

Reason: Add Media Button not Working

The biggest reason is that WordPress faces a clash of stylesheets and scripts that load with the help of themes and plugins enabled on your website. By default, WordPress loads all the important stylesheets and scripts after merging requests. It helps WordPress to deliver you with better speed and performance.

So, what happens when this problem occurs is that JavaScript used on the Add Media button (just like on other buttons) faces conflict and the button stops working.

Don’t worry! This issue is not irreparable. We help you know how.

Fix Add Media Button Not Working in WordPress

After learning about the real cause, it’s easy to fix this issue. You need to stop the conflict arising in the post editor JavaScript. For this, you need to add a code to your PHP file.

[Note: This is a temporary and quick solution to get rid of the issue. First perform this and then head to fixing the issue permanently. The long-term fix is given later in the post. Scroll down.]

  • Head to wp-config.php file
  • Search for the sentence, “That’s all, stop editing! Happy blogging
  • Just before this sentence, add this code:
define('CONCATENATE_SCRIPTS', false );

When you add this code, WordPress will know that each script must be loaded in a separate way. In this way, there will not be any kind of JavaScript conflict with your site.

You can make sure the error is fixed by going to the Post Editor and check if the Add Media button has started working again.

How to fix Add Media button not working issue permanently?

You need to find the exact source so that the script that caused the issue doesn’t come up again. You can run the inspect tool to find the issue source in the simplest way.

Also, follow these tips to find out which theme or plugin was responsible:

[Note: It’s advised to not perform these steps on a live website. Instead, you must use the staging site. You can create a staging site for your domain by accessing the hosting account of your website.]

  • Once the staging site is created, disable all the plugins installed and activated on this staging site. If the Add Media button is now working, then the problem was caused by one or more of these plugins. Reinstall these one by one and keep checking the Add Media button. Once the real cause is in front of you, uninstall it.
  • In case none of the plugins were causing the add media button not working in WordPress, you need to check the enabled theme. For this, switch to the default theme of WordPress, i.e. Twenty Seventeen. If the issue is now fixed, you need to change to a new theme that is more reliable. Also, report the previous faulty theme to the developer so that the bug can be fixed soon.

For those wondering how to fix add media button not working in WordPress, these tips can be very helpful in resolving the issue and preventing it from happening in the future.

Your Comment:

Related Posts

change menu color in wordpress


How To

How to Change the Menu Color in WordPress?

You have spent so much time searching for the most appropriate website theme as per your business. You have finally found the right one: the best layout, font, and everything else. But you are facing an issue which is how to change the menu color. Changing header color in WordPress is also easy. Do not worry, WordPress […]

Change WordPress Theme


How To

How to Change WordPress Theme without Losing Content?

Do you want to change WordPress theme without losing content? If yes, this guide will help you. WordPress is a CRM that can be quickly modified. Your website may have been outgrown to an existing theme and would obviously look amazing with the added features. Altogether, a WordPress theme will accomplish everything.   All in all, you[…]

Change WordPress Background Color


How To

How to Change WordPress Background Color of a Single Page?

The first thing any website visitor notices is the background color and font of a website. Agree? The background color gives a powerful impression of your business. Well, it’s one of the essentials of quality design. The color and the website visuals reflect your brand, style, readability, and even professionalism. This is the reason why deciding the[…]