WordPress plugin installation tips: unexpected error has occurred.

Copyright: Life program https://blog.csdn.net/cnpinpai/article/details/84574931

WordPress install plug-in tips: error unexpected occurred . WordPress.org or this server's configuration may have some problems.

After recently changed servers, installing WordPress, giving the US industry network ready to import test data, you need to install in the background called WordPress import tool after the plug-point installation, WordPress occurred following error message:

Unexpected error has occurred. WordPress.org or this server's configuration may have some problems. If you continue to experience difficulties, please try the support forums.

Tried to install plug-ins and updates from WordPress WordPress backend such a prompt appeared, my first reaction is not the server with WordPress server Unicom, looked at the code in WordPress, WordPress interfaces domain name is: api.wordpress.org , then look in the server ping the domain name is a communication state, and is not connected to a wall or the situation does not appear.

By WordPress finished package, query the error phrase in English is like this:

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>.

Chinese not search tutorials, then in English to try on Google search, I got the following solution:

In the WordPress wp-config.phpIs there find this line of code: define('WP_HTTP_BLOCK_EXTERNAL', 1);
if he will have to delete or change a 1 to 0

Looked at my wp-config.php, and there is no line of code, it seems only a question of plug-ins, then checked the list of plugins, first saw this plugin: Airplane Mode, suddenly realized that the crux in this, after disabling the plug everything back to normal.

Airplane Mode is a plug-in a speed up WordPress running speed locally, it will disable some connection to the outside, such as Gavatar head, external fonts, WordPress background Home News and WordPress automatic updates, but did not think that this plugin will be disabled off all external http request, victims of troubleshooting busy for a long time!

In addition, if your server ping nowhere api.wordpress.org, then you can try the following methods:
Run the command under Linux server: vim /etc/resolv.conf
add the following two lines in it:
nameserver 8.8.8.8
nameserver 8.8.4.4

-- Finish--

Guess you like

Origin blog.csdn.net/cnpinpai/article/details/84574931