Couple of things worth checking, also you don’t mention if this is a new problem or if you could search before and it’s now stopped working.
In your WordPress admin, under settings there are two boxes with urls that point to where WordPress is installed and the home, make sure these are filled in and are correct.
If that’s not it, then it could be your server can’t communicate with WordPress.org this maybe due to the way your host has configured their servers.
You may need to use a proxy to make an external http request, if this was the case it’s probably something your host will have told you about and given you some settings which can then be added to your wp-config.php
/** EXAMPLE - proxy settings */
define('WP_PROXY_HOST', 'proxy.url.com');
define('WP_PROXY_PORT', '1234');
define('WP_PROXY_USERNAME', '');
define('WP_PROXY_PASSWORD', '');
define('WP_PROXY_BYPASS_HOSTS', 'localhost');
Other issues, maybe related to if the host doesn’t have security bundles installed this might also cause the connection to fail. Ultimately you may need to contact your host to help you resolve such issues.
However before you do, a way to get more information is to turn on WP_DEBUG by going to your wp-config.php file and setting the WP_DEBUG to true. Then retrying to search for a new plugin. Hopefully some additional error messages will appear with more detailed information.
Thank you so much Tim for your detail explanation. I tried all your steps lastly I updated my WordPress 4.0 version manually using this link tutorial.
Also contacted my host provider about this issue and probably they change the settings and it started working again.
Thank you so much.
Glad it’s sorted, from your description it sounds like someone at the hosting company forgot to do something and quickly fixed it.