errors – why would ABSPATH not get defined

Question

Last week I got an error in my logs on a standard WP install –

Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /wp-settings.php on line 33

I have ABSPATH defined in wp-config as standard:

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . "https://wordpress.stackexchange.com/" );

And it seems the site only accessed wp-settings because of the next line in wp-config:

require_once ABSPATH . 'wp-settings.php';

Yet when it went to wp-settings, ABSPATH was not defined?

There is only one error like this, and the site works fine. What could be causing ABSPATH not to be defined, to throw this once off error?

0
jon 3 weeks 2021-07-04T10:55:45-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse