Error: cURL error 28: Operation timed out after 5001 milliseconds with 0 bytes received How to Fix Add Media Button Not Working in WordPress - html5wp
How to Fix Add Media Button Not Working in WordPress

One of our users recently noticed that their WordPress site’s “Add Media” button had mysteriously ceased functioning. 
Users are left in the dark about why their “Add Media” button is malfunctioning because this issue doesn’t show any error or warning. 
This post will provide an easy cure for the WordPress ‘Add Media’ button not functioning problem.

 

What makes the ‘Add Media’ button on WordPress stop Working?

Conflicting scripts or stylesheets loaded by WordPress plugins or themes on your website are a typical source of this issue. WordPress loads all necessary scripts and stylesheets by merging the requests by default.

To increase efficiency and speed, this is often done in the WordPress admin area.

All buttons on the screen of the WordPress post editor, including the add media button, employ JavaScript. The ‘Add Media’ button will not function if JavaScript is prevented from running due to a conflict.

Add media button stopped working in WordPress

After that, let’s look at how to diagnose and resolve the ‘Add Media’ button issue in WordPress.

 

Fixing WordPress’s Problem with the Add Media Button

The quick fix is to add the following code to your wp-config.php file. You can do this by editing wp-config.php file and adding this code just before the line that says ‘That’s all, stop editing! Happy writing!

This code only instructs WordPress to load each script independently, preventing a JavaScript clash between problematic programs and essential WordPress functions.

Visit the post edit screen after adding the code to check that the add media button is functioning as intended.

Because the problem is still being caused by a script, adding this code is not a viable long-term remedy. Using the inspect tool is a simpler approach to identify the issue’s origin. It will display console errors so you can find the conflict’s origin.

Use the fundamental WordPress troubleshooting steps to identify which plugin or theme may be the problem if you want a long-lasting cure for this problem.

Instead of doing this on a live site, we highly advise you to do it on your staging site. A step-by-step tutorial for building a WordPress staging site is provided here. All of the top WordPress hosting providers, including Bluehost, SiteGround, WP Engine, and Liquid Web, provide one-click staging.

You must first turn off all of your WordPress plugins on your staging site before determining whether the “Add Media” button has been repaired. If it does, one of the plugins was probably the problem.

Deactivate all plugins

Now that each plugin has been activated, you may check the “Add Media” button after each one. This will assist you in identifying the problematic plugin. Once you identify the offender, you can either switch it out for another plugin or contact the plugin’s developer for assistance.

The next option is to temporarily switch to a default WordPress theme like Twenty Seventeen if removing plugins does not resolve the problem.

Switch to a default WordPress theme

Your theme is the source of the conflict if switching to the default theme resolves it for you. You can contact the theme’s author for assistance or choose another WordPress theme.

You may deploy the repair to your live WordPress site once you identify the issue’s root cause on your staging site.

img
Facebook Group

User discussion forum

img
Support Desk

Have questions or need help?

img
Documentation

Articles that cover common questions.