fbpx

How to turn off SSL certificate validation when using WordPress’s WP_Http API call

Background

At times you might want to avoid certificate checking when developing a WordPress application. This could especially be true when you are developing on localhost or in a development environment where HTTPS is available but it’s using a self-signed certificate. WP-Http calls will fail and it will be difficult to see under the hood what’s happening if this occurs.

Use this command to turn off SSL validation:

add_filter( 'https_ssl_verify', '__return_false' );

Reference

WP_Http::post()

Share this article

Share on facebook
Share on twitter
Share on linkedin

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top