Error: cURL error 28: Operation timed out after 5001 milliseconds with 0 bytes received
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.
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.
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.
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.
User discussion forum
Have questions or need help?
Articles that cover common questions.