【问题标题】:Wordpress wp-settins.php errors Notice: Use of undefined constant ABSPATHWordpress wp-settins.php 错误注意:使用未定义常量 ABSPATH
【发布时间】:2017-09-27 04:35:01
【问题描述】:

刚刚使用本教程https://www.digitalocean.com/community/tutorials/wordpress-lamp-ubuntu-16-04-ru 安装了 Wordpress,打开 wp-settings.php 时出现 php 错误

Notice: Use of undefined constant ABSPATH - assumed 'ABSPATH' in /var/www/wordpress/wp-settings.php on line 19
Warning: require(ABSPATHwp-includes/load.php): failed to open stream: No such file or directory in /var/www/wordpress/wp-settings.php on line 19
Fatal error: require(): Failed opening required 'ABSPATHwp-includes/load.php' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/wordpress/wp-settings.php on line 19

好的,我试过了

sudo chmod 755 $(find /var/www/wordpress/ -type d)
sudo chmod 644 $(find /var/www/wordpress/ -type f)

试图在 wp-config.php 中手动设置 WP 文件的方式。尝试了另一个版本的 WP。将文件和文件夹的所有权设置为非 root sudo-user。没有什么变化。在明确的 14.04 和 16.04 ubuntu 上尝试过,什么也没有。

你的常量必须是字符串。

它是字符串,我没有从 repo 更改文件。 另外,我的 WP 无法自行更新,因为

Warning: copy(/var/www/wordpress/wp-admin/includes/update-core.php): failed to open stream: Permission denied in /var/www/wordpress/wp-admin/includes/class-wp-filesystem-direct.php on line 257

【问题讨论】:

    标签: php wordpress ubuntu permissions lamp


    【解决方案1】:

    我的错误,我应该打开 domain/wp-admin/options.php 而不是 domain/wp-settings.php

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-02-06
      • 2018-06-30
      • 2011-02-25
      相关资源
      最近更新 更多