Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

358
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda