最近在優化 wordpress 的 site health,遇到了以下錯誤
/wp-json/wp/v2/types/post?context=edit
The REST API request failed due to an error.
Error: stream_socket_client(): SSL operation field with code 1. OpenSSL Error messages: error:0A000410:SSL routines::sslv3 alert handshake failure stream_socket_client: Failed to enable crypto stream_socket_client
解法:
-
安裝正確的
php7.4-curl
(php-${version}-curl) -
重啟 web server
service nginx restart