• 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-content/plugins $ wp plugin update header-footer-elementor
    Enabling Maintenance mode...
    Downloading update from http://downloads.wp.xz.cn/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-content/plugins $ wp plugin update essential-addons-for-elementor-lite
    Enabling Maintenance mode...
    Downloading update from http://downloads.wp.xz.cn/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>
    
    <strong>It is linked to the fact that the wp cli uses the http url, instead of https</strong>:
    

    curl http://downloads.wp.xz.cn/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>`

    However, if I try to download the plugin manually using the https url, it works:
    curl https://downloads.wp.xz.cn/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

Viewing 1 replies (of 1 total)
  • Thread Starter jcmanciot

    (@jcmanciot)

    The original title has been truncated from ‘Impossible to update any plugin because wp cli uses http instead of https’.

Viewing 1 replies (of 1 total)

The topic ‘Impossible to update any plugin because wp cli uses http instead’ is closed to new replies.