Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

356
Views
Unknown column 'wp_' in 'field list' when running WordPress on PHP 8.1

Is it possible to run Wordpress on PHP 8.1 right now? I have installed PHP 8.1 in XAMPP, but I can't get Wordpress to work. I get this error message:

[23-Nov-2021 18:44:43 UTC] PHP Fatal error: Uncaught mysqli_sql_exception: Unknown column 'wp_' in 'field list' in C:\xampp\htdocs\my_php_81_folder\normal_local_site\wp-includes\wp-db.php:2056 Stack trace: #0 C:\xampp\htdocs\my_php_81_folder\normal_local_site\wp-includes\wp-db.php(2056): mysqli_query(Object(mysqli), 'SELECT wp_') #1 C:\xampp\htdocs\my_php_81_folder\normal_local_site\wp-includes\wp-db.php(1945): wpdb->do_query('SELECT wp') #2 C:\xampp\htdocs\my_php_81_folder\normal_local_site\wp-admin\setup-config.php(317): wpdb->query('SELECT wp_') #3 {main} thrown in C:\xampp\htdocs\my_php_81_folder\normal_local_site\wp-includes\wp-db.php on line 2056 [23-Nov-2021 18:45:45 UTC] PHP Fatal error: Uncaught mysqli_sql_exception: Unknown column 'wp_' in 'field list' in C:\xampp\htdocs\my_php_81_folder\normal_local_site\wp-includes\wp-db.php:2056

I have verified that PHP 8.1 is being served to this folder and I can run PDO and mysqli commands that successfully create and modify local databases.

over 4 years ago · Santiago Trujillo
2 answers
Answer question

0

As of November 2021* WordPress is not yet fully compatible with PHP 8.1. The WordPress 5.9 release that is planned to be available on 25th January 2022 should be compatible with PHP 8.1.

For the time being, please use PHP 8.0 with WordPress to avoid weird bugs.

* PHP 8.1 was released on 25th November 2021

over 4 years ago · Santiago Trujillo Report

0

For anyone who reaches this in the next couple days before Wordpress 5.9 comes out, I was able to get 5.8.3 working on PHP 8.1 by making a quick change to wp-includes/wp-db.php. I added this line after if ( $this->use_mysqli ) in the db_connect method (line 1630):

mysqli_report(MYSQLI_REPORT_OFF);

This change is one made in Wordpress 5.9 itself, so should be fine.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!