【问题标题】:Fresh Wordpress Install on Azure Fails to Update to 3.7Azure 上的全新 Wordpress 安装无法更新到 3.7
【发布时间】:2013-10-25 22:52:38
【问题描述】:

我决定试用 Windows Azure 来托管 Wordpress。所以我刚刚使用 Azure 中的网站选项从库中创建了一个全新的 Wordpress 安装。

这是我尝试更新到 3.7 时得到的结果

Downloading update from http://wordpress.org/wordpress-3.7-no-content.zip…
Unpacking the update…
Verifying the unpacked files…
Preparing to install the latest version…
Enabling Maintenance mode…
Copying the required files…
Disabling Maintenance mode…
Could not copy file.: index.php
Installation Failed

任何想法为什么会发生这种情况?

【问题讨论】:

  • 我遇到了同样的问题。如果您查看 php_errors.log 文件,您可能会看到更多详细信息。我的抱怨权限。 PHP 警告:复制(C:/DWASFiles/Sites/[site]/VirtualDirectory0/site/wwwroot/index.php):无法打开流:C:\DWASFiles\Sites[site]\VirtualDirectory0\site\wwwroot 中的权限被拒绝\wp-admin\includes\class-wp-filesystem-direct.php 在第 200 行 现在只是确定它需要哪些权限而它没有。
  • 一旦你弄清楚权限,听起来像是一个很好的帖子答案。但就目前而言,这更像是一个评论而不是一个答案。
  • 哎呀,我应该发表评论,对不起:(
  • 奇怪的是,我今天又去更新了我的网站,它更新成功了,我这边没有任何变化。我现在在 3.7 中运行没有问题。

标签: wordpress azure


【解决方案1】:

我遇到了同样的问题,并得到了与 Jef 相同的错误消息。要修复它,请执行以下操作:

打开 wp-config.php 并删除/删除/注释掉这些代码行:

    define('FS_METHOD','direct');
    define('FS_CHMOD_DIR',0777);
    define('FS_CHMOD_FILE',0666);

现在添加这些代码行:

    define('FS_CHMOD_DIR', (0755 & ~ umask()));
    define('FS_CHMOD_FILE', (0644 & ~ umask()));

保存并上传 wp-config.php。转到您的仪表板并运行更新。系统将要求您提供 ftp 用户名和密码。

【讨论】:

  • 嗨,我试过了(因为我和 OP 有同样的问题),但不幸的是它没有解决问题 - wordpress 更新系统不请求凭据。使用 ftp 凭据可能是一种可行的方法,不久将对此进行测试codex.wordpress.org/… ?
  • @StepLocke - 你让它工作了吗?一年后我也遇到了同样的问题,但它是 WordPress V4 的问题。
猜你喜欢
  • 1970-01-01
  • 2019-07-09
  • 1970-01-01
  • 2015-06-17
  • 2021-01-06
  • 1970-01-01
  • 2013-08-13
  • 2019-09-30
  • 2021-09-06
相关资源
最近更新 更多