As of April 2026, DEFINE SERVER is a WordPress 429 plugin with 0 active installations and a 0/5 rating0. It has been downloaded 1.1K+ times in total. Requires WordPress 4.2+ and PHP 5.6.0+. Available on WordPress.org since 2020. Last updated 6 years ago — may have compatibility concerns.
由于未知原因,Wordpress屏蔽了来自中国的访问,这就造成了服务器在中国的wordpress无法进行正常的更新与安装主题等功能。根据网络现有资源,我“组合”出了一个插件来解决此问题。
站在巨人的肩膀上
所以我拿了1的替换服务器部分代码加上2的配置页面,组成了“DEFINE SERVER”。
插件功能通过替换Wordpress国内无法访问的域名来实现。
核心代码如下:
$url = str_ireplace( 'api.wordpress.org', $wsOptions["apiserver"], $url );
$url = str_ireplace( 'downloads.wordpress.org', $wsOptions["downserver"], $url );<h3>使用:</h3>
你可以选择在wp后台安装,亦或者手动安装
后台安装
wordpress插件页面地址https://wordpress.org/plugins/DEFINE-SERVER/,你也可以尝试在后台搜索DEFINE-SERVER
手动安装
下载插件
你可以在github的 releases页面获取最新版本信息,然后下载zip压缩包。
上传并启用
通过 WordPress 后台上传安装,或者直接将源码上传到 WordPress 插件目录wp-content/plugins,然后 在后台启用。(路径{WP_DIR}/wp-content/plugins/define-server/define-server.php)
插件默认激活后会设置服务器为api.wordpress.org,dow…
| WordPress | 4.2+ requiredTested up to 5.3.21 |
| PHP | 5.6.0+ required |
Plugin data sourced from WordPress.org. Analysis and metrics by PluginSift.