When your WordPress installation has problems with updating and retrieving files over SSL, because of outdated certificates, you can bypass this.
It`s actually a workaround, not a fix!
Just place the following code in your theme or plugin
// SSL fix
add_filter( 'https_ssl_verify', '__return_false' );
add_filter( 'https_local_ssl_verify', '__return_false' );
Please don’t do this and fix your PHP configuration, as this is very bad practice.
but for those who use shared hosting
Hi Ramoonus,
Those users that use shared hosting need to get their hosting company in action to fix the PHP configuration, or need to switch hosting companies. It’s that simple 😉
Two settings are important in your php.ini:
curl.cainfo
openssl.cafile
The value for
curl.cainfo
can also be set during runtime withcurl_setopt()
, andopenssl.cafile
usingstream_context_set_option()
Have a look at:
https://php.net/manual/en/function.curl-setopt.php
https://php.net/manual/en/migration56.openssl.php
https://php.net/manual/en/context.ssl.php
https://php.net/manual/en/function.stream-context-set-option.php
https://www.saotn.org/dont-turn-off-curlopt_ssl_verifypeer-fix-php-configuration/