Wordpress curl timing out and saying 'Moved Permanently'

I tried updating to wordpress 5.6 and it did not work. I tried installing a plugin for offline updates and the plugin install gave the same error:

Download failed.: cURL error 28: Connection timed out after 10001 milliseconds

Which is very strange since when I'm SSH'd in I can curl the exact link that it is updating to just fine, but it actually gives me what appears to be the problem:

$ curl http://downloads.wordpress.org/release/wordpress-5.6-new-bundled.zip
html
headtitle301 Moved Permanently/title/head
body
centerh1301 Moved Permanently/h1/center
hrcenternginx/center
/body
/html

On the site health page, it says two critical issues:

Could not reach WordPress.org
Communicating with the WordPress servers is used to check for new versions, and to both install and update WordPress core, themes or plugins.

Error Your site is unable to reach WordPress.org at 198.143.164.251, and returned the error: cURL error 28: Connection timed out after 10000 milliseconds
Your site could not complete a loopback request


Loopback requests are used to run scheduled events, and are also used by the built-in editors for themes and plugins to verify code stability.

The loopback request to your site failed, this means features relying on them are not currently working as expected.
Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)

Which is weird because 198.143.164.251 is reachable by icmp and port 80, but curl appears have problems as well:

$ curl http://wordpress.org/
html
headtitle301 Moved Permanently/title/head
body
centerh1301 Moved Permanently/h1/center
hrcenternginx/center
/body
/html

Can anyone help me troubleshoot this?

Topic curl updates Wordpress

Category Web


For both your curl examples, the error is that your target is http: and not https:

Either add https to the address, or use

curl http://downloads.wordpress.org/release/wordpress-5.6-new-bundled.zip -L

-L will follow redirects

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.