在代客php 8上安装WordPress(PHP致命错误:wp-includes/wp-db.php:2056中不存在未捕获的mysqli_SQL_Exeption表‘wp_Options’)

时间:2021-12-15 作者:Hasan Tareq

当我使用我的Laravel代客泊车安装WordPress时,显示了这一信息,它通过以下消息停止安装:

[15-Dec-2021 18:09:15 UTC] PHP Fatal error:  Uncaught mysqli_sql_exception: Table \'tutor.wp_options\' doesn\'t exist in /Users/hasan/Sites/tutor/wp-includes/wp-db.php:2056
Stack trace:
#0 /Users/hasan/Sites/tutor/wp-includes/wp-db.php(2056): mysqli_query(Object(mysqli), \'SELECT option_n...\')
#1 /Users/hasan/Sites/tutor/wp-includes/wp-db.php(1945): wpdb->_do_query(\'SELECT option_n...\')
#2 /Users/hasan/Sites/tutor/wp-includes/wp-db.php(2695): wpdb->query(\'SELECT option_n...\')
#3 /Users/hasan/Sites/tutor/wp-includes/option.php(284): wpdb->get_results(\'SELECT option_n...\')
#4 /Users/hasan/Sites/tutor/wp-includes/functions.php(1730): wp_load_alloptions()
#5 /Users/hasan/Sites/tutor/wp-includes/load.php(752): is_blog_installed()
#6 /Users/hasan/Sites/tutor/wp-settings.php(159): wp_not_installed()
#7 /Users/hasan/Sites/tutor/wp-config.php(107): require_once(\'/Users/hasan/Si...\')
#8 /Users/hasan/Sites/tutor/wp-load.php(50): require_once(\'/Users/hasan/Si...\')
#9 /Users/hasan/Sites/tutor/wp-admin/admin.php(34): require_once(\'/Users/hasan/Si...\')
#10 /Users/hasan/Sites/tutor/wp-admin/index.php(10): require_once(\'/Users/hasan/Si...\')
#11 /Users/hasan/.composer/vendor/laravel/valet/server.php(234): require(\'/Users/hasan/Si...\')
#12 {main}
  thrown in /Users/hasan/Sites/tutor/wp-includes/wp-db.php on line 2056

1 个回复
最合适的回答,由SO网友:CRavon 整理而成

您应该使用php 7.4。因此,请首先验证它是否已安装:

brew install [email protected]
然后与代客泊车:

valet use [email protected]
那么

valet restart