Support » Fixing WordPress » Error: "WordPress could not establish a secure connection to WordPress.org."

  • souldeux

    (@souldeux)


    I’m getting the following error whenever I try to update or install a plugin, theme, or WordPress itself:

    Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /home1/nlperry/public_html/wp-includes/update.php on line 119

    Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /home1/nlperry/public_html/wp-includes/update.php on line 287

    Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /home1/nlperry/public_html/wp-includes/update.php on line 435

    Using a HTTPS-Tester plugin gives me the following info:

    Unfortunately, there have been reports that some hosts configurations are not allowing it to work, this plugin is used to debug it and find out what’s going on.

    [PASS]: Your WordPress install claims to support HTTPS Connections
    [PASS]: Checking that the HTTPS Root Certificate bundle exists and is accessible
    [PASS]: cURL is installed and supports SSL communication, cURL Details: version_number=463623; age=3; features=1597; ssl_version_number=0; version=7.19.7; host=x86_64-redhat-linux-gnu; ssl_version=NSS/3.15.3; libz_version=1.2.3; protocols=tftp,ftp,telnet,dict,ldap,ldaps,http,file,https,ftps,scp,sftp
    [PASS]: OpenSSL is installed. OpenSSL 1.0.1e-fips 11 Feb 2013 268439647
    [PASS]: Checking if stream_socket_client exists
    [PASS]: Checking if openssl_x509_parse exists
    [FAIL]: Verifying api.wordpress.org resolves correctly. 66.155.40.204
    [PASS]: [Streams] Communication with WordPress.org suceeded, it took 0.328 seconds
    [PASS]: [Streams with a POST body] Communication with WordPress.org suceeded, it took 0.332 seconds
    [FAIL]: [cURL] Communication with WordPress.org failed with error: [http_request_failed]: Problem with the SSL CA cert (path? access rights?)
    [FAIL]: [cURL with a POST body] Communication with WordPress.org failed with error: [http_request_failed]: Problem with the SSL CA cert (path? access rights?)
    [INFO]: PHP Version: 5.4.29

    I do not know what to make of this, though. I see the ‘fails’ but am stuck here – how can I resolve this issue?

    I’ve tried updating WordPress and replacing update.php, but neither have worked.

Viewing 10 replies - 1 through 10 (of 10 total)
  • esmi

    (@esmi)

    I’d suggest passing that debug log onto your hosts.

    Just curious, what is the name of the plugin that you are using to test https connections?

    I had the same error, using WP 4.0

    Here is the response from my ISP:
    =====================
    There a few complaints from WordPress users regarding the same. The problem does not seem to be at the server side which we have already checked and reported to WordPress. There is no answer from them. The accounts we tested before, although there is this error message, the updates does work just fine.

    Can you please confirm the update you performed went well?
    =====================

    And yes, the update did complete satisfactorily.

    Hello,… I also face same problem after I update my WP to 4.1

    (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /home/freecybe/public_html/wp-includes/update.php on line 295

    anybody can help me?

    Thank in advance

    I’m getting the same error message. I backed up and tried updating plugins anyway and the updates were successful.

    However, on trying to update themes I get the familiar error message:

    Warning: An unexpected error occurred. Something may be wrong with WordPress.org or this server’s configuration. If you continue to have problems, please try the support forums. (WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in ***/wp-includes/update.php on line 295

    I’m thinking the problem may have something to do with this:

    https://make.wordpress.org/meta/2014/09/23/wordpress-org-is-now-forced-ssl/

    Hey I was troubleshooting this same issue for a client who’s site I host, although I was not getting the error on the update page, only on add themes and add plugins.

    No idea if the SSL thing has anything to do with it but the issue for the plugins page appeared to be a timeout setting.

    I was able to fix it by editing wp-admin/includes/plugin-install.php and changing the line that read
    'timeout' => 15,
    to
    'timeout' => 60,

    I haven’t found a fix for the themes issue yet.

    Performing a couple of curl commands suggested there is no difference between the http and https versions of the wordpress api page.

    # time curl -vvv http://api.wordpress.org/plugins/info/1.0/
    * About to connect() to api.wordpress.org port 80 (#0)
    *   Trying 66.155.40.249... connected
    > GET /plugins/info/1.0/ HTTP/1.1
    > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
    > Host: api.wordpress.org
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Server: nginx
    < Date: Fri, 30 Jan 2015 02:00:44 GMT
    < Content-Type: text/html; charset=utf-8
    < Transfer-Encoding: chunked
    < Connection: keep-alive
    < Vary: Accept-Encoding
    < X-Frame-Options: SAMEORIGIN
    <
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<title>bbPress › Error</title>
    	<meta name="robots" content="noindex, nofollow" />
    	<link rel="stylesheet" href="http://wordpress.org/plugins/bb-admin/install.css" type="text/css" />
    </head>
    <body>
    	<div id="container">
    	<p>Action not implemented. <a href="http://codex.wordpress.org/WordPress.org_API">API Docs</a>
    </p>
    	<p class="last">Back to <a href="http://wordpress.org/plugins/">WordPress Plugins</a>.</p>
    	</div>
    </body>
    </html>
    * Connection #0 to host api.wordpress.org left intact
    * Closing connection #0
    
    real	0m15.418s
    user	0m0.008s
    sys	0m0.000s
    
    # time curl -vvv https://api.wordpress.org/plugins/info/1.0/
    * About to connect() to api.wordpress.org port 443 (#0)
    *   Trying 66.155.40.250... connected
    * successfully set certificate verify locations:
    *   CAfile: none
      CApath: /etc/ssl/certs
    * SSLv3, TLS handshake, Client hello (1):
    * SSLv3, TLS handshake, Server hello (2):
    * SSLv3, TLS handshake, CERT (11):
    * SSLv3, TLS handshake, Server key exchange (12):
    * SSLv3, TLS handshake, Server finished (14):
    * SSLv3, TLS handshake, Client key exchange (16):
    * SSLv3, TLS change cipher, Client hello (1):
    * SSLv3, TLS handshake, Finished (20):
    * SSLv3, TLS change cipher, Client hello (1):
    * SSLv3, TLS handshake, Finished (20):
    * SSL connection using ECDHE-RSA-AES128-SHA
    * Server certificate:
    * 	 subject: OU=Domain Control Validated; CN=*.wordpress.org
    * 	 start date: 2014-12-06 00:13:18 GMT
    * 	 expire date: 2017-12-15 20:11:21 GMT
    * 	 subjectAltName: api.wordpress.org matched
    * 	 issuer: C=US; ST=Arizona; L=Scottsdale; O=GoDaddy.com, Inc.; OU=http://certs.godaddy.com/repository/; CN=Go Daddy Secure Certificate Authority - G2
    * 	 SSL certificate verify ok.
    > GET /plugins/info/1.0/ HTTP/1.1
    > User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
    > Host: api.wordpress.org
    > Accept: */*
    >
    < HTTP/1.1 200 OK
    < Server: nginx
    < Date: Fri, 30 Jan 2015 02:01:18 GMT
    < Content-Type: text/html; charset=utf-8
    < Transfer-Encoding: chunked
    < Connection: keep-alive
    < Vary: Accept-Encoding
    < X-Frame-Options: SAMEORIGIN
    <
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
    <head>
    	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    	<title>bbPress › Error</title>
    	<meta name="robots" content="noindex, nofollow" />
    	<link rel="stylesheet" href="https://wordpress.org/plugins/bb-admin/install.css" type="text/css" />
    </head>
    <body>
    	<div id="container">
    	<p>Action not implemented. <a href="http://codex.wordpress.org/WordPress.org_API">API Docs</a>
    </p>
    	<p class="last">Back to <a href="https://wordpress.org/plugins/">WordPress Plugins</a>.</p>
    	</div>
    </body>
    </html>
    * Connection #0 to host api.wordpress.org left intact
    * Closing connection #0
    * SSLv3, TLS alert, Client hello (1):
    
    real	0m15.665s
    user	0m0.004s
    sys	0m0.008s

    Update. I have also fixed themes as well.

    Edit wp-admin/includes/theme.php and add the ‘timeout’ => 60, line as shown below.

    $url = $http_url = 'http://api.wordpress.org/themes/info/1.0/';
                    if ( $ssl = wp_http_supports( array( 'ssl' ) ) )
                            $url = set_url_scheme( $url, 'https' );
    
                    $args = array(
                            'timeout' => 60,
                            'body' => array(
                                    'action' => $action,
                                    'request' => serialize( $args )
                            )
                    );
                    $request = wp_remote_post( $url, $args );

    I am setting up a new blog and trying to install a new plugin but getting the following error:
    An unexpected error occurred.~(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.) in /home/~/wp-admin/includes/plugin-install.php on line 83

    I am pretty new to the curl scripting and blog as well. Can someone please help me in getting this issue resolved.

    Thanks,
    Ravin

    Have the same problem

    Same here

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Error: "WordPress could not establish a secure connection to WordPress.org."’ is closed to new replies.