WordPress Install plugin hint "WordPress has an unexpected error, may wordpress.org or the server configuration file has problems"

Source: Internet
Author: User

Install wordpress plugin, Prompt for error "WordPress unexpected error, may wordpress.org or server configuration file problems"

The problem page is http://10.225.254.42/wp-admin/update.php?action=install-plugin&plugin=bbpress&_wpnonce= 39e9668a43

To view/wp-admin/update.php This file, the code to process Action=install-plugin This GET request is as follows

}ElseIf(' install-plugin ' = =$action ) {        if(! Current_user_can (' Install_plugins '))) Wp_die (__ (Sufficient permissions to install plugins on this site. ' ) ); include_once(Abspath. ' wp-admin/includes/plugin-install.php ');//For Plugins_api.Check_admin_referer (' Install-plugin_ '.$plugin ); $api= Plugins_api (' Plugin_information ',Array(            ' Slug ' =$plugin, ' fields ' =Array(                ' Short_description ' =false, ' sections ' =false, ' requires ' =false, ' rating ' =false, ' ratings ' =false, ' downloaded ' =false, ' last_updated ' =false, ' added ' =false, ' tags ' =false, ' compatibility ' =false, ' homepage ' =false, ' donate_link ' =false,            ),        ) );

Continue to view wp-admin/includes/plugin-install.php's Plugins_api method:

if(false===$res ) {        $url=$http _url= ' http://api.wordpress.org/plugins/info/1.0/'; if($ssl= Wp_http_supports (Array(' SSL ' ) ) )            $url= Set_url_scheme ($url, ' HTTPS ' ); $http _args=Array(            ' Timeout ' and ' body ' =Array(                ' Action ' =$action, ' request ' =Serialize($args )            )        ); $request= Wp_remote_post ($url,$http _args ); if($ssl&& Is_wp_error ($request ) ) {            Trigger_error(__ (' An unexpected error occurred. Something May is wrong with wordpress.org or this server& #8217; s configuration. If you continue to has problems, please try the <a href= "https://wordpress.org/support/" >support forums</a>. ‘ ) . ‘ ‘ . __ (' (WordPress could not establish a secure connection to wordpress.org. Please contact your server administrator.) ' ),headers_sent() || Wp_debug?e_user_warning:E_user_notice ); $request= Wp_remote_post ($http _url,$http _args ); }        if(Is_wp_error ($request) ) {            Print_r($request-error_data); Echo $request-errors; $res=NewWp_error (' plugins_api_failed ', __ (' An unexpected Error occurred. Something May is wrong with wordpress.org or this server& #8217; s configuration. If you continue to has problems, please try the <a href= "https://wordpress.org/support/" >support forums</a>. ‘ ),$request-get_error_message ()); } Else {            $res= Maybe_unserialize (Wp_remote_retrieve_body ($request ) ); if( !Is_object($res) &&!Is_array($res ) )                $res=NewWp_error (' plugins_api_failed ', __ (' An unexpected Error occurred. Something May is wrong with wordpress.org or this server& #8217; s configuration. If you continue to has problems, please try the <a href= "https://wordpress.org/support/" >support forums</a>. '), Wp_remote_retrieve_body ($request ) ); }

After an afternoon of struggle, and then think, access to WordPress has been relatively slow, is not the connection timed out?

Ping api.wordpress.com on ping.chinaz.com, find a faster IP address 66.155.40.186, configured to/etc/host, sure enough

I wish the early victory of the party President!!!!!!

WordPress Install plugin hint "WordPress has an unexpected error, may wordpress.org or the server configuration file has problems"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.