Make WordPress Core

Opened 2 years ago

Last modified 2 years ago

#56270 new defect (bug)

Impossible to update any plugin because wp cli uses http instead of https

Reported by: jcmanciot's profile jcmanciot Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 6.0
Component: Upgrade/Install Keywords:
Focuses: Cc:

Description

ubuntu 22.04
wp 6.0.1
WP-CLI: 2.6.0
curl 7.81.0-1ubuntu1.3
php 8.1.7

Updating any plugin with the cli tool or from the browser throws the same error. For instance:

$ wp plugin update header-footer-elementor
Enabling Maintenance mode...
Downloading update from http://downloads.wordpress.org/plugin/header-footer-elementor.1.6.12.zip...
Warning: Download failed. "cURL error 77: "
Disabling Maintenance mode...
+-------------------------+-------------+-------------+--------+
| name                    | old_version | new_version | status |
+-------------------------+-------------+-------------+--------+
| header-footer-elementor | 1.6.11      | 1.6.12      | Error  |
+-------------------------+-------------+-------------+--------+
Error: No plugins updated.

$ wp plugin update essential-addons-for-elementor-lite
Enabling Maintenance mode...
Downloading update from http://downloads.wordpress.org/plugin/essential-addons-for-elementor-lite.5.1.8.zip...
Warning: Download failed. "cURL error 77: "
Disabling Maintenance mode...
+-------------------------------------+-------------+-------------+--------+
| name                                | old_version | new_version | status |
+-------------------------------------+-------------+-------------+--------+
| essential-addons-for-elementor-lite | 5.1.4       | 5.1.8       | Error  |
+-------------------------------------+-------------+-------------+--------+
Error: No plugins updated.<code></code>

This issue is caused by the fact that the wp cli uses the http url, instead of https:
1) with http:
curl http://downloads.wordpress.org/plugin/header-footer-elementor.1.6.12.zip
<html>
<head><title>301 Moved Permanently</title></head>
<body>
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx</center>
</body>
</html>`

2) with https:
curl https://downloads.wordpress.org/plugin/header-footer-elementor.1.6.12.zip –output header-footer-elementor.1.6.12.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 546k 100 546k 0 0 629k 0 –:–:– –:–:– –:–:– 628k

QED

Change History (2)

#1 @SergeyBiryukov
2 years ago

  • Component changed from General to Upgrade/Install

This ticket was mentioned in Slack in #cli by costdev. View the logs.


2 years ago

Note: See TracTickets for help on using tickets.