您现在的位置是:首页 > cms教程 > WordPress教程WordPress教程
wordpress安装插件“wordpress发生意外错误,可能WordPress.org
惜霜2025-03-19WordPress教程已有人查阅
导读安装wordpress插件,提示报错“wordpress发生意外错误,可能WordPress.org或服务器配置文件存在问题”出问题的页面是查看/wp-admin/update.php这个文件,处理action=install-plugin这个get请求的代码如下
安装wordpress插件,提示报错“wordpress发生意外错误,可能WordPress.org或服务器配置文件存在问题”
出问题的页面是
在ping.chinaz.com上ping api.wordpress.com,找了一个比较快的ip地址66.155.40.186,配置到/etc/host中。
出问题的页面是
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中。
本文标签:
很赞哦! ()
图文教程
WordPress对接阿里云OSS的方法教学
阿里云对象存储服务 (OSS) 是一种高度可伸缩且安全可靠的云对象存储服务,让您可以存储、备份和归档大量数据。阿里云 OSS 是一种简单易用的服务
WordPress增加文章排序方式的方法
WordPress怎么增加文章排序方式?很多网站的文章列表页面都可以查看排序方法,但是在wp系统中是没有这个功能
WordPress怎么修改页面底部的自定义文字
1、首先找到向所有文章底部添加自定义内容的代码,1、首先找到向所有文章底部添加自定义内容的代码
wordpress添加登录的具体步骤
1. 打开wordpress控制后台,点击右上角的wordpress图标,2. 然后点击“插件”“安装插件”
相关源码
-
pbootcms响应式蓝色旅游旅行社pbootcms网站源码下载为旅游公司、旅行社定制的响应式网站模板,聚焦旅游线路展示、景点推荐及预约服务场景。采用PbootCMS内核开发,自适应技术确保PC与手机端数据实时同步查看源码 -
pbootcms网站网络公司个人作品展示类网站源码(自适应)为网站建设公司、网络服务企业打造的响应式门户解决方案,基于PbootCMS内核深度开发。采用前沿自适应架构,无缝适配手机端交互与PC端展示需求。查看源码 -
(PC+WAP)蓝色智能环保机械设备网站营销型pbootcms模板下载本模板基于PbootCMS系统开发,为环保设备制造企业设计,特别适合展示环保机械、智能装备等产品。采用响应式技术,确保各类设备参数和技术方案在不同终端上都能清晰展示。查看源码 -
(自适应)宽屏大气红色机械设备pbootcms模板源码下载为机械设备制造企业设计的响应式网站模板,采用PbootCMS内核开发。宽屏布局突出设备展示效果,红色工业风格贴合机械行业属性,支持PC端与手机端自动适配查看源码 -
(PC+WAP)激光水幕音乐喷泉设备工程网站源码下载本模板基于PbootCMS系统开发,为喷泉设备工程类企业设计,特别适合展示音乐喷泉、激光水幕等水景艺术项目。采用响应式技术,确保各类工程案例在不同设备上都能呈现视觉效果。查看源码 -
响应式艺考培训学校机构pbootcms模板html5源码基于PbootCMS免费开源内核开发,为艺考培训学校与艺术机构设计,替换图文即可快速适配全行业需求。响应式布局兼容手机/PC端,数据实时同步,运维效率提升300%。查看源码
| 分享笔记 (共有 篇笔记) |

