WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
    $response = wp_remote_post( 'ssl://securesite.com', array(
        'method' => 'POST',
        'body' => $string, // variable is set
        'timeout' => apply_filters( 'http_request_timeout', 15),
        'sslverify' => true

    error_log(print_r($response, TRUE));

    if ( is_wp_error($response) ) {
        return FALSE;

    $result = wp_remote_retrieve_body($response);

The result is an error:

[30-Aug-2011 21:53:53] WP_Error Object
[errors] => Array
        [http_request_failed] => Array
                [0] => Unsupported protocol: ssl


[error_data] => Array


If I use fsockopen and fgets everything works fine.

Seems like I'm missing an undocumented trick since ssl should be handled by wp_remote_post.

share|improve this question

This doesn't seem to be error coming from WP itself, but is likely generated by curl, which WP likes to pick first for network requests.

I'd try to replicate request with curl by hand on your hosting and elsewhere.

If you are content with doing network request in other way you can tweak to make WP skip curl as transport and go for other options.

share|improve this answer
Do you know what filter I should be using to skip curl for this instance of wp_remote_post without skipping curl for all the other http posts? – Dan Cameron Aug 30 '11 at 22:41
@Dan Cameron I usually use must-have Core Control plugin for debugging network transport issues. – Rarst Aug 30 '11 at 23:04

Where did you get "ssl://" as being a valid protocol from?

Did you try it with "https://" instead?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.