WordPress Add Media Button Not Working: How to Fix It Quickly
We know the frustration. You are busy preparing a post for publication, so you decide to add some media but the WordPress Add Media button doesn’t work much to your chagrin.
This problem is frustrating because you don’t know what is wrong and your workflow is bearing the brunt of it all. In this post, we show you exactly how to fix Add Media button not working.
That being said, let us dive right in and wow us with your thoughts and suggestions in the comments.
Download all in one WordPress cheat sheet
Cause of The Add Media Button Not Working
The most common cause of the Add Media button not working is script conflicts among your WordPress themes and plugins. JavaScript runs a lot of features in the WordPress admin including the Add Media button.
When the JS script that runs the Add Media button collides with any other script, it fails to process disabling the Add Media button.
A closely related problem – the Insert into post button not working – is caused by permission errors on a folder, more so when you switch hosts, but that is a story for another day.
Now that this problem is no longer shrouded in mystery, let us troubleshoot and fix Add Media button not working in WordPress.
How to Fix WordPress Add Media Button Not Working
Using FTP client or File Manager, access your WordPress root directory and open the wp-config.php file for editing.
Next, add the following code to just before the line that says “That’s all, stop editing! Happy blogging.”
define('CONCATENATE_SCRIPTS', false);
Save changes to your wp-config.php file. Log out of your WordPress site and clear all of your caches i.e. browser, plugin, 3rd-party, and server cache.
Log in back to your WordPress admin and check if the Add Media button is working.
The above code simply tells WordPress to load each script individually instead of combining the requests, which is what WordPress does by default.
Loading the scripts separately minimizes the chances of running into conflicts.
While this code is your best chance of fixing the Add Media button, it is not a permanent solution since the problem indicates you have conflicting scripts on your site, something you obviously want to fix.
Troubleshooting The Cause of WordPress Add Media Button Not Working
Now let us find the root of the script conflict, so you can eliminate the problem once and for all. We recommend you do this on a staging website instead of a live website.
You can pinpoint the cause of your woes using your browser’s Inspect -> Console. The console tool highlights script errors that can help you to identify where the problem lies.
That aside, start by deactivating all of your plugins. Then check if the Add Media button is working. If the button is working, then it is obvious one of your plugin is causing the script conflict.
Next, reactivate the plugins one by one, and check the Add Media button after each activation. When you find the responsible plugin, contact the developer for help or find a replacement.
If the problem persists after deactivating all plugins, you need to ensure you’ve cleared your caches first and then test if your theme is the cause of the WordPress Add Media button not working.
Just activate a default WordPress theme such as Twenty Seventeen and then check if the problem is gone. If the button works, the issue here is your theme.
What to do? Talk to the theme developer for support or change to another theme. If you know your way around code, you can even eliminate the conflict by editing your theme’s files.
When you find the cause of the problem on your staging site, you can go ahead and implement the fix on your live WordPress site.
Conclusion
Usually, the Add Media button breaks due to script conflict somewhere on your website. The line of code we added to wp-config.php we shared earlier should work like magic.
That aside, we recommend you update your WordPress site, so that you can get rid of old code and scripts that might cause conflicts, hence this problem.
Additionally, remember your cache might mislead you to think you have a problem, so it’s vital to clear your cache after/before trying the solution in this post.
Learn How to Solve Other WordPress Errors
How to Use Debug WordPress Function
How to Fix Database Connection Errors on WordPress
How to Solve Internal Server Error (500) on WordPress
How to Fix upload_max_filesize Errors in WordPress
How to Solve max_execution_time Exceeded Error
How to Fix “Parse Error: Syntax Error, Unexpected” in WordPress
How to Fix Broken Permalinks in WordPress