Reputation: 111
I was not able to install plugins in my WordPress site.
I am getting the following error when i try to install a new plugin.But its allowing me to upload a plugin and then to install it.
"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."
Upvotes: 6
Views: 41919
Reputation: 25
I faced the same issue. In my case (on windows server), I just activated the php curl extension in my php.ini and it worked.
So make sure that the curl extension is activated on your php.ini
Upvotes: 0
Reputation: 101
There are few steps that you can look for:
make sure you have sufficient space on your domain
try uninstalling all the available plugins one by one and check (eg : plugin like WP Video Lightbox causes issue like this sometimes
Disable all plugins and then reactivating them
if you are running wordpress on your virtual machine, try ping test on your server side.
if nothing works try installing new version of wp
Upvotes: 0
Reputation: 157
I had the same problem on fedora but after searching for a while it seems that SELinux denied permission to make outgoing network connections. You can find evidence of this in /var/log/audit/audit.log. For example: type=AVC msg=audit(1531585576.912:201): avc: denied { name_connect } for pid=802 comm="php-fpm" dest=443 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:http_port_t:s0 tclass=tcp_socket permissive=0
To resolve the problem:
setsebool -P httpd_can_network_connect 1
Now SELinux will permit WordPress to make outgoing network connections to check for updates.
Upvotes: 7
Reputation: 49
My solution :wp-config.php in add code
define('WP_HTTP_BLOCK_EXTERNAL', false);
Also appeared :
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. |Try Again|
Is there a better solution, looking forward to sharing
Upvotes: 3
Reputation: 103
Try to turn SELinux to permissive to see if it was causing the problem.
And to do that open this file:
nano /etc/selinux/config
Then change the line SELINUX=enforcing
to SELINUX=permissive
Then reboot:
sudo shutdown -r now
Upvotes: 1
Reputation: 3285
After spending more time is this I have resolved this by looking at
wp-config.php
Make sure this flag is false, if it's true update couldn't be happen
define('WP_HTTP_BLOCK_EXTERNAL', false);
Upvotes: 11
Reputation: 49
To debug this set WP_DEBUG to true in wp-config.
define('WP_DEBUG', true);
In my case this shows a curl error attempting to reach host: api.wordpress.org when loading the add new plugins page.
On my server curl was already installed correctly. You can run this command to install it on Ubuntu:
sudo apt-get install curl
The solution in my case was to restart Apache.
sudo service apache2 restart
After this the plugin page resolved normally.
Set Debug back to false when you confirm everything is working:
define('WP_DEBUG', false);
Upvotes: 3
Reputation: 2828
Steps I would use:
When I have run to that error it has usually been some misconfiguration in my machine, either denying write access or outgoing network access from the web server processes.
What do your PHP and web server logs have? Is the site on localhost or on a production server?
Upvotes: 0