ABSPATH not defined?
this issue needs a bit of backstory and I'm not sure on how to fix this.
I had a server running Apache and PHP 5.4, I moved to a vps using NGINX and PHP 7.4. Right now I'm getting errors saying ABSPATH is not defined (the directory has changed).
These are the errors:
[04-Apr-2022 14:38:47 Europe/Berlin] PHP Warning: require(ABSPATHWPINC/option.php): failed to open stream: No such file or directory in /home/cloudpanel/htdocs/dev.pctoppers.nl/wp-includes/functions.php on line 8
[04-Apr-2022 14:38:47 Europe/Berlin] PHP Fatal error: require(): Failed opening required 'ABSPATHWPINC/option.php' (include_path='.:/usr/share/php') in /home/cloudpanel/htdocs/dev.pctoppers.nl/wp-includes/functions.php on line 8
[04-Apr-2022 15:01:31 Europe/Berlin] PHP Warning: Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in /home/cloudpanel/htdocs/dev.pctoppers.nl/wp-settings.php on line 33
[04-Apr-2022 15:01:31 Europe/Berlin] PHP Warning: require(ABSPATHwp-includes/version.php): failed to open stream: No such file or directory in /home/cloudpanel/htdocs/dev.pctoppers.nl/wp-settings.php on line 33
[04-Apr-2022 15:01:31 Europe/Berlin] PHP Fatal error: require(): Failed opening required 'ABSPATHwp-includes/version.php' (include_path='.:/usr/share/php') in /home/cloudpanel/htdocs/dev.pctoppers.nl/wp-settings.php on line 33
This is the WP-CONFIG ABSPATH:
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
If you guys have any clue on how to go about fixing this please let me know because I have no clue where to start. If you need any more information let me know!
Thanks in advance!