PHP 8.1 and WordPress 6.1.1
-
We are currently running a test for compatibility of wordpress 6.1.1 and PHP 8.1. However, our install gives this error below.
Fatal error: Uncaught Error: Undefined constant "‘FS_METHOD’" in /var/www/liblog/wp-config.php:77 Stack trace: #0 /var/www/liblog/wp-load.php(50): require_once() #1 /var/www/liblog/wp-blog-header.php(13): require_once('/var/www/liblog...') #2 /var/www/liblog/index.php(17): require('/var/www/liblog...') #3 {main} thrown in /var/www/liblog/wp-config.php on line 77
Here are the last lines of the config file:define ('WPLANG', '');
/* That's all, stop editing! Happy blogging. / /* WordPress absolute path to the WordPress directory. / if ( !defined('ABSPATH') ) define('ABSPATH', dirname(FILE) . '/'); /* Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
//define(ENABLE_CACHE, true)
define('FS_METHOD','DIRECT');
?>It would seem that
define('FS_METHOD','DIRECT');
is not in the correct place. If I move it up abovedefine ('WPLANG', ''
, everything works.
But how did it get to that last line?
Is it safe to move it up?
More importantly, will it come back every time I do an update?
- The topic ‘PHP 8.1 and WordPress 6.1.1’ is closed to new replies.