Opened 3 years ago
Last modified 3 years ago
#43110 new defect (bug)
Warning: WordPress could not establish a secure connection to WordPress.org
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9.2 |
Component: | General | Keywords: | reporter-feedback |
Focuses: | Cc: |
Description
Not sure if this is a core bug, but since the message has WordPress.org in it I thought it might have a relation with core. I have updated to 4.9.2 just today and occasionally, specially when the site is idle for some time, I am getting the following 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 /var/www/wp-projects/multibase/wp-includes/update.php on line 348
However, if I refresh the page the message goes away and everything "seems" to be normal. I am on multisite setup and working at my localhost.
<?php if ( $ssl && is_wp_error( $raw_response ) ) { trigger_error( sprintf( /* translators: %s: support forums URL */ __( '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 <a href="%s">support forums</a>.' ), __( 'https://wordpress.org/support/' ) ) . ' ' . __( '(WordPress could not establish a secure connection to WordPress.org. Please contact your server administrator.)' ), headers_sent() || WP_DEBUG ? E_USER_WARNING : E_USER_NOTICE ); $raw_response = wp_remote_post( $http_url, $options ); }
Hi @subrataemfluence,
Are you still experiencing this?
In general, this warning is shown when there's a slow network connection between you and WordPress.org, which results in the connection timing out.
The simplest way of finding out if this is the cause, is to run the following code:
If that doesn't succeed, try increasing the timeout to 10 (seconds) if that succeeds, the issue is down to the network speed.
We set a reasonably low timeout on the API requests as most servers are on much faster connections than most development servers (which i where the error will show up).