Error: “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.” indicates a connection problem between your website or hosting and the WordPress.org website.
The error can be seen on the Plugin > Add New page

To learn more about this error, let’s check the code of the WordPress page where it is shown: wp-admin/includes/plugin-install.php

In this file we can see that to load plugins an API call is made to http://api.wordpress.org/plugins/info/1.2/ and that call requires several things:
- curl is used to make the call
- there is a 15 seconds timeout
- valid SSL is needed if https is used
So if any of these is not working on your server, your WordPress website will not be able to connect to WordPress.org API and display WordPress plugins.
Possible causes and solutions for this error:
Cause | How to check | Solution |
---|---|---|
Curl extension is not available in PHP | Create an info.php file and check if curl is available | install curl or change the PHP version |
Incorrect file permission in CloudLinux | Temporary disable SELinux | nano /etc/selinux/config and change the line SELINUX=enforcing to SELINUX=permissive |
outgoing network requests from WordPress are blocked | open wp-config.php and look for define('WP_HTTP_BLOCK_EXTERNAL', true); | remove the line from wp-config.php file or change it to false |
SSL certificate expired | Using an online tool | generate a new SSL or disable https redirects |
Network error from your hosting to wp.org | curl api.wordpress.org from the server | contact your hosting provider |
Error on api.wordpress.org website | ping api.wordpress.org from the server | contact WordPress.org |
Network error on your local server | curl or ping google.com from your local server | check network-related settings for your OS (/etc/resolv.conf /etc/hosts) |
The first thing to check is if your server can connect to the WordPress.org API – not your website, but your hosting server!
This is important because if there is a problem on the WordPress.org website, your server or the network between those two, then there is nothing you can do except notify your hosting provider.
To check if your server can connect to WordPress.org API, use the same method that the wp-admin/includes/plugin-install.php page uses:
curl http://api.wordpress.org/plugins/info/1.2/
If you get a response:

That means that your server has no problem connecting to the WP API and the problem is on your website side.
But if you get a timeout error like this:

then your server can’t connect to the WordPress.org website and you should notify your hosting provider.