Multisite database upgrade SSL error

If possible, you should try and fix the cause of this error – invalid SSL certificates. But there are some instances where this is not possible or desirable. One obvious one being development sites using a self-signed SSL certs.

One way around this is to set $ssl_verify to false before line 1161 of wp-includes/class-http.php:

curl_setopt( $handle, CURLOPT_SSL_VERIFYHOST, ( $ssl_verify === true ) ? 2 : false )

The way I’ve done this in the past is by adding:

$ssl_verify = false;

To line 1159, before doing a multi-site upgrade and removing it afterwards. It looks like there should be much more sophisticated way of doing this. It looks from the code around it that judging by the code around it that you should be able to parse paramater sslverify=false but that doesn’t appear to work (probably because the upgrade wrapper doesn’t pass through the parameters).

To avoid making changes to Core I would un-do this change once you have completed the upgrade.

Leave a Comment