WordPress Critical Error on Installation

During a WordPress installation, you receive a critical error after entering the database information and click next and the server is running PHP 8.0 or higher.

Example Error: “wpdb->query()\n#3 {main}\n thrown in /var/www/html/wp-includes/wp-db.php on line 2056”

In order to fix this error, open/edit setup-config.php. Its located in the /wp-admin/ directory.

Beneath the line that says, “define( ‘WP_SETUP_CONFIG’, true );” enter the following line: “@mysqli_report(MYSQLI_REPORT_OFF);”

Click the browser back button, verify your information again and then click next.

The installation will now succeed. This is a known bug issue that has since been patched, however, older templates may still result in this error.