Recently I have found this issue that ‘Add Media’ button on my WordPress site suddenly stopped working. This problem does not show any warning or error that leaves the user in dark about why their ‘Add Media’ button is not working. In this post, I shall show you how to easily fix the ‘Add Media’ button not working issue in WordPress site.
What causes the WordPress ‘Add Media’ Button to Stop Working?
Usually, this problem occurs due to conflicting scripts or stylesheets loaded by WordPress themes or plugins installed on your website. The default behavior of WordPress site is to load all needed stylesheets and scripts by combining the requests.
It is usually done in the admin area of WordPress to improve the speed and performance of website.
After this discussion, let’s see how to troubleshoot and fix the Add Media button not working problem in WordPress.
Fixing Add Media Button Not Working Issue in WordPress
Add the following code to your wp-config.php file to fix it quickly. You need to edit wp-config.php file to add this code just before the line that says. That is it, stop editing and enjoy blogging.
After doing it, go to the post edit screen to observe if the media button is working as expected or not.
Note: Adding this code is not a proper long-term solution because you still have a script that is causing the issue. Using the inspect tool is an easier way to find the source of the problem. It will display you console errors that can lead you to the source of the conflict or problem.
Do not forget to see our guide on Best Managed WordPress hosting.
I also suggest that you do this on your staging site instead of a live website.
You need to begin with deactivating of all your WordPress plugins and then check whether the Add Media button is functional or not. If it does, then this shows that one of your plugins was creating the problem.
Now activate the plugins one by one, after the activation of plugin, check the Add Media button. It will help you to find out which plugin is causing the problem. After finding the plugin that is causing issues, replace it with another plugin or ask the plugin author for help.
If the deactivation of plugins does not solve the issue, then the next step is to switch to the default WordPress theme like twenty seventeen.
After switching to the default theme solves the issue for you, it means that your theme was causing the conflict. You can ask theme author for support or switch to another WordPress theme.
After finding the source of the problem on your staging site, you can apply the fix on your live WordPress website too.
I hope that you liked the article and it helped you to learn how to fix Add Media button not working in WordPress.
Arsalan Rauf is an entrepreneur, freelancer, creative writer, and also a fountainhead of Green Hat Expert. Additionally, he is also an eminent researcher of Blogging, SEO, Internet Marketing, Social Media, premium accounts tips and tricks, etc.