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.
Don’t worry! This issue is not irreparable. We help you know how.
Fix Add Media Button Not Working in WordPress
[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 );
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.