sam sujith
sam sujith

Reputation: 111

An unexpected error occurred. Something may be wrong with WordPress.org

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

Answers (9)

Loth237
Loth237

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

vimal Arya
vimal Arya

Reputation: 101

There are few steps that you can look for:

  1. make sure you have sufficient space on your domain

  2. try uninstalling all the available plugins one by one and check (eg : plugin like WP Video Lightbox causes issue like this sometimes

  3. Disable all plugins and then reactivating them

  4. if you are running wordpress on your virtual machine, try ping test on your server side.

  5. if nothing works try installing new version of wp

Upvotes: 0

Mohit Sharma
Mohit Sharma

Reputation: 677

add ob_start() at top of wp-config.php that work for me

Upvotes: -1

Xilbreks
Xilbreks

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

jerry xu
jerry xu

Reputation: 49

My solution :wp-config.php in add code

define('WP_HTTP_BLOCK_EXTERNAL', false);

Also appeared :

enter image description here

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

abu8na9
abu8na9

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

HMagdy
HMagdy

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

Matt Owens
Matt Owens

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

ojrask
ojrask

Reputation: 2828

Steps I would use:

  1. Validate that the filesystem allows WordPress to write to the WordPress directories.
  2. Validate that you have allowed outgoing traffic in your web server, firewall and internal network.

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

Related Questions