首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >cURL错误6在新闻区域,也不会自动更新

cURL错误6在新闻区域,也不会自动更新
EN

WordPress Development用户
提问于 2017-03-07 06:56:27
回答 1查看 2.2K关注 0票数 0

我试图让我的博客与自动更新,在最近被“黑客”击中,有人覆盖了一篇文章(没有太恶意,但我们失去了文章)。问题是,自动更新似乎不起作用。

我不确定这是否相关,但是我在仪表板上得到了这个错误:

RSS错误: WP HTTP错误: cURL错误6:无法解析主机: wordpress.org

通过命令行运行,连接良好:

代码语言:javascript
复制
curl --head --insecure -v http://planet.wordpress.org
* Rebuilt URL to: http://planet.wordpress.org/
* Hostname was NOT found in DNS cache
*   Trying 66.155.40.250...
* Connected to planet.wordpress.org (66.155.40.250) port 80 (#0)
> HEAD / HTTP/1.1
> User-Agent: curl/7.38.0
> Host: planet.wordpress.org
> Accept: */*
>
< HTTP/1.1 200 OK
HTTP/1.1 200 OK
* Server nginx is not blacklisted
< Server: nginx
Server: nginx
< Date: Tue, 07 Mar 2017 06:51:04 GMT
Date: Tue, 07 Mar 2017 06:51:04 GMT
< Content-Type: text/html
Content-Type: text/html
< Content-Length: 174858
Content-Length: 174858
< Connection: keep-alive
Connection: keep-alive
< Vary: Accept-Encoding
Vary: Accept-Encoding
< Last-Modified: Tue, 07 Mar 2017 06:45:10 GMT
Last-Modified: Tue, 07 Mar 2017 06:45:10 GMT
< X-Frame-Options: SAMEORIGIN
X-Frame-Options: SAMEORIGIN
< X-nc: EXPIRED lax 250
X-nc: EXPIRED lax 250
< Accept-Ranges: bytes
Accept-Ranges: bytes

<
* Connection #0 to host planet.wordpress.org left intact

在我看来,卷发在phpinfo()中是可行的;

我安装了"Update“插件,我得到:

代码语言:javascript
复制
PASS: Your WordPress install can communicate with WordPress.org securely.
PASS: No version control systems were detected.
FAIL: Your installation of WordPress prompts for FTP credentials to perform updates. (Your site is performing updates over FTP due to file ownership. Talk to your hosting company.)

顺便提一句,插件安装/更新在没有FTP信息的情况下运行良好(即我可以通过简单的单击来安装它们,而不必输入我的FTP登录名),所以我对为什么自动更新不能工作(以及卷曲问题)感到有点困惑。

任何建议都是非常感谢的!

EN

回答 1

WordPress Development用户

回答已采纳

发布于 2017-03-13 15:26:51

今天,我也遇到了同样的问题,终于找到了解决办法(实际上,是我的一个朋友做的)。我所做的就是编辑/etc/nginx/nginx.conf文件并添加解析器ip地址。server部分中的配置文件现在包含在下面的resolver 127.0.0.1;中,您可以找到其中的一部分

代码语言:javascript
复制
server {
    listen       443 ssl;
    resolver        127.0.0.1;

不要忘记重新启动nginxphp-fpm服务,这取决于您的发行版,使用archlinux您可以执行以下操作

代码语言:javascript
复制
systemctl stop php-fpm
systemctl stop nginx
systemctl start php-fpm
systemctl start nginx

希望能帮上忙。

票数 1
EN
页面原文内容由WordPress Development提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://wordpress.stackexchange.com/questions/259127

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档