Skip to content

wp-cli core download add retry flag #155

@centminmod

Description

@centminmod

Feature Request

Describe your use case and the problem you are facing

If downloads.wordpress site has connectivity issues, wp core download will timeout

Error: Failed to get url 'https://downloads.wordpress.org/release/wordpress-5.4.1.tar.gz.md5': cURL error 28: Connection timed out after 10001 milliseconds.

Describe the solution you'd like

If the underlying download client is curl, why not add flags that allow curl to retry the download if there are issues ? like

wp core download --retry 5

to retry download 5 times

wp core download --retry 5 --retry-delay 10

to retry download 5 times but wait 10 seconds between retries

equivalent curl commands you can replicate in wp cli

curl --help | grep try
     --happy-eyeballs-timeout-ms <milliseconds> How long to wait in milliseconds for IPv6 before trying IPv4
     --retry <num>   Retry request if transient problems occur
     --retry-connrefused Retry on connection refused (use with --retry)
     --retry-delay <seconds> Wait time between retries
     --retry-max-time <seconds> Retry only within this period

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions