WordPress wp-settins.php errors Notice: Use of undefined constant ABSPATH

Just installed WordPress with this tutorial https://www.digitalocean.com/community/tutorials/wordpress-lamp-ubuntu-16-04-ru and got php errors when open wp-settings.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

Okey, I tried

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

Tried to manually set the way to WP’s files in wp-config.php. Tried another version of the WP. Set the ownership of the files and folders to not-root sudo-user. Nothing changes. Tryed on clear 14.04 and 16.04 ubuntu and nothing.

Your constants need to be strings.

It is string, I didn’t change files from repo.
Also, my WP can’t update itself because

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

Read more here: WordPress wp-settins.php errors Notice: Use of undefined constant ABSPATH

Leave a Reply

Your email address will not be published. Required fields are marked *