wordpress安装插件提示“wordpress发生意外错误,可能WordPress.org或服务器配置文件存在问题”...
安装wordpress插件,提示报错“wordpress发生意外错误,可能WordPress.org或服务器配置文件存在问题”
出问题的页面是http://*.*.*.*/wp-admin/update.php?action=install-plugin&plugin=bbpress&_wpnonce=39e9668a43
查看/wp-admin/update.php这个文件,处理action=install-plugin这个get请求的代码如下
} elseif ( 'install-plugin' == $action ) {if ( ! current_user_can('install_plugins') )wp_die( __( 'You do not have 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,),) );
继续查看wp-admin/includes/plugin-install.php的plugins_api方法:
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' => 15,'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 be wrong with WordPress.org or this server’s configuration. If you continue to have 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 = new WP_Error('plugins_api_failed', __( '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="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 = new WP_Error('plugins_api_failed', __( '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="https://wordpress.org/support/">support forums</a>.' ), wp_remote_retrieve_body( $request ) );}
经过了一下午的挣扎,然后想,访问wordpress的时候一直比较慢,是不是连接超时了呢?
在ping.chinaz.com上ping api.wordpress.com,找了一个比较快的ip地址66.155.40.186,配置到/etc/host中,果然好了
祝病魔早日战胜方校长!!!!!!
转载于:https://www.cnblogs.com/wuxie1989/p/5773800.html
wordpress安装插件提示“wordpress发生意外错误,可能WordPress.org或服务器配置文件存在问题”...相关推荐
- WordPress安装插件提示:发生了预料之外的错误。
WordPress安装插件提示:发生了预料之外的错误.WordPress.org或是此服务器的配置可能出了一些问题. 最近换了个服务器,安装好WordPress之后,在给美业网准备导入测试数据,需要在 ...
- wordpress安装插件提示需要ftp账号和密码解决
在wordpress安装之后,想要安装一个插件来用,结果提示输入ftp账户与密码,而我本人根本不记得什么时候设置过ftp账户与密码.最后搜索了一下网上的解决方案,所需要更改wordpress文件夹的权 ...
- Yosimite 系统 “发生意外错误(错误代码-50)” (记一次macbook pro(mid2012) 自主维修排错经历)...
电脑型号: Macbook Pro(Mid 2012) A1278 问题描述: 上周,电脑偶尔弹出提示框"发生意外错误(错误代码-50)",弹出这个提示之后硬盘好像变成只读模式 ...
- 解决Openwrt安装插件提示一下错误的办法
解决Openwrt安装插件提示一下错误的办法 Openwrt安装17ce插件,提示一下错误: Collected errors: * check_data_file_clashes: Package ...
- Discuz!教程之应用中心安装插件提示“数据下载错误(105)”的解决办法
近期很多用户在应用中心安装应用,提示105错误,大部分是阿里云的服务器,PHP 5.3.28.PHP5.3.29等. 通过常规的方法排查后,仍然不能解决问题,官方给出的说明是PHP问题,升级PHP即可 ...
- C#使用request.GetRequestStream() 提示“底层连接已关闭:发送时发生意外错误”的问题
在使用HttpWebRequest的实例request请求网址时,在调用request.GetRequestStream()时提示 "底层连接已关闭:发送时发生意外错误"的问题 论 ...
- HttpWebRequest 提示 “基础连接已关闭:发送时发生意外错误” 的解决方法
HttpWebRequest 多次请求不同网站时,由于安全协议问题.提示错误 "The underlying connection was closed: An unexpected err ...
- Wordpress安装插件失败
Wordpress安装插件失败,可能是由于没有设置PHP环境变量 解决: 1.添加PHP的系统环境变量,设置php.exe所在路径,如下图是windows 10的设置环境: 打开命令行,执行php - ...
- 运行windows live writer时发生“意外错误”
安装完成后按照介绍的配置方法,提示 "尝试检测日志设置时发生意外错误 QI for IEnumVARIANT failed on the unmanaged server",goo ...
最新文章
- mysql导入Excel数据
- react native 导入组件
- mysql配置参数调优(8GB内存和64GB内存)
- 号外号外!自动化测试工具AutoRunner V4.2 新版本升级预告!
- 使用plsql developer 创建用户
- java动态打印_JFreeChart学习(三)——动态打印java内存使用情况
- 科学计算机看电量,解密:关于手机电量为1%是如何科学的算出来的?
- 前端学习(2116):为什么组件data必须是函数
- mac下解决mysql乱码问题
- 线性拟合——从最大似然估计到平方误差到huber loss
- 密封槽设计标准_密封槽设计标准
- DllRegisterServer调用失败
- android 增加定时开关机
- 【前沿技术了解】-- 云原生技术与架构
- Azkaban安装并设置定时任务Schedule以及邮件发送接收
- Spring中循环依赖详解
- buflab-计算机系统实验
- Ubuntu软件安装与卸载
- 计算机考研C语言基础
- 中国人寿保险软件开发机试题 java实现