rest api – wp-cli command throws error : “SSL routines:tls_process_server_certificate:certificate verify failed” while querying https website


I use wp-cli with wp restful plugin installed.

Running wp cli command wp user list --http=https://[url] throws below error:

Error: Failed to get url '[url]': stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
stream_socket_client(): Failed to enable crypto
stream_socket_client(): unable to connect to ssl://[url]:443 (Unknown error).

The website is protected by self-signed certificate. How to cause wp-cli to work with website at https://...?

Is there --insecure or --cacert curl functionality in wp-cli?

Found this post, but found no solution there.

rok 4 months 2021-06-26T04:37:40-05:00 0 Answers 0 views 0

Leave an answer