阿里云WordPress 更新失败问题解决

WordPress更新问题.jpg

一次性完美解决阿里云WordPress自动升级失败,更新失败问题

如果你自己操作起来有困难可以联系我购买加速服务或代部署服务

  WordPress在国内经常遇到更新失败的问题,可使用WordPress提供的WP_HTTP_PROXY 让WordPress通过代理访问网络。

参考资料

WP_HTTP_Proxy

There are caveats to proxy support. It requires that defines be made in the wp-config.php file to enable proxy support. There are also a few filters that plugins can hook into for some of the constants.
Please note that only BASIC authentication is supported by most transports. cURL MAY support more methods (such as NTLM authentication) depending on your environment.
The constants are as follows:
WP_PROXY_HOST – Enable proxy support and host for connecting.
WP_PROXY_PORT – Proxy port for connection. No default, must be defined.
WP_PROXY_USERNAME – Proxy username, if it requires authentication.
WP_PROXY_PASSWORD – Proxy password, if it requires authentication.
WP_PROXY_BYPASS_HOSTS – Will prevent the hosts in this list from going through the proxy. You do not need to have localhost and the site host in this list, because they will not be passed through the proxy. The list should be presented in a comma separated list, wildcards using * are supported, eg. *.wordpress.org

官网阅读全文

修改配置

修改WordPress根目录下wp-config.php 文件,在文件尾部添加下面内容;

/** 设置HTTP代理服务器 */
define('WP_PROXY_HOST', '127.0.0.1');
define('WP_PROXY_PORT', '1099');
define('WP_PROXY_USERNAME', '');
define('WP_PROXY_PASSWORD', '');
define('WP_PROXY_BYPASS_HOSTS', 'localhost');

新建代理服务器

  在国外购买一个VPS配置一个代理服务器,在本地服务器上装上客户端,开一个HTTP代理服务,需要更新时打开即可;
具体建立方法请自行Google;
  一个便宜的VPS大概一个月在二三十元那样,成本不高,还可以做一些网站用用;
推荐几个比较常用的VPS厂家都有便宜的VPS:Vultr,Digitalocean , CloudeCone
前两个是我现在都在使用的;

版权所有©艾克斯记事-转载文章请注明出处(带链接)

3人评论了“阿里云WordPress 更新失败问题解决”

发表评论

电子邮件地址不会被公开。 必填项已用*标注

%d 博主赞过: