fix-add-media-button-not-working-wordpress

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

Fix-Error-Too-Many-Redirects-in-WordPress

02

Jul
How To

How to Fix Error Too Many Redirects Issue in WordPress

Too many redirects issue on WordPress? No worries! This happens due to an incorrect settings or faulty plugin. When this issue arises, the user is unable to enter their website’s dashboard. Go through this complete post and save yourself from the hassle of not being able to access your website due to the ‘too many redirects’ error. […]

Fix-Wordpress-Login-Page-Refreshing-Redirecting-Issue

30

Jun
How To

How To Fix WordPress Login Page Refreshing/Redirecting Issue

The issue of WordPress login page refreshing/redirecting is very common. When this happens, users get locked out of their website’s admin dashboard and cannot access anything inside it. Although this WordPress issue can occur at anytime due to some specific reasons, there are some easy solutions to resolve it. In this post, we help you discover how[…]

Fix-Error-Establishing-a-Database-Connection-WordPress

29

Jun
How To

How to Fix the Error Establishing Database Connection in WordPress

You face ‘error establishing database connection’ issue in WordPress due to many reasons. Beginners feel more agitated because the error seems to be irreparable. Don’t worry! You can fix this issue by a few ways. In this post, we’ll help you learn how to fix the error establishing database connection in WordPress. The reasons why this problem[…]