Unknown column 'wp_' in 'field list' when running WordPress on PHP 8.1
I installed xampp and then WordPress. After submitting database info, i am getting Critical error.i found that wordpress is not compatible for PHP 8.1 so how to shift for older version of PHP on xampp.
"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):......."
Will I tried And YAY!! therefor see the solution that i come with:
1- Go to Download WordPress from HERE!!!!!! then under On my computer select win/mac/Linux then go down and download the one that work with your operating system.
2- Then install It's simple
Noties: WordPress will install phpmyadmin and Apache, therefor it will not need Xampp. It's a stand alone
3- copy the wordpress files from the installation
and then edit the wp-config.php in xampp copied wordpress.
in the wp-config.php
save it.
-4 edit the User's and the GRANT in the xampp phpMyAdmin Login then go to DB called phpmyadmin => PRIVILEGES => new User
add the user you saw in define( 'DB_USER', 'bn_wordpress' ); and then add the same paswoord you putted in wp-config.php => Go_Hacker_Nothing_to_see_here XD
5- go to wordpress phpmyadmin, for me it was http://127.0.0.1:81/phpmyadmin/
Login as root + the password that you set on wordpress installation.
Go to Database bitnami_wordpress then export as .sql then go.
6- go to xampp phpmyadmin Login as root or whatever then add new Database and call it as same as in the wp-config.php define( 'DB_NAME', 'bitnami_wordpress' );
With this database selected go to import "Next to export" and select the .sql file from your downloads folder.
-7 edit the port in table= wp_options for home and siteurl or just put them as http://localhost/wordpress/
8- with the bitnami_wordpress database selected go to PRIVILEGES then the wordpress user that you created select edit-PRIVILEGES then go to Database next to global and select the database you created for wordpress and press go. then select all and go.
9- in the wp-config.php edit this
Dont forget to create the file there
10- Go To http://localhost/wordpress/wp-admin Login with the setup username and password, and delete all post in there!
11- Go to sittings then permalink and set Common Settings to Plain
**BTW:**WordPress Can Not be Installed With Xampp higher than 8.0.14
So if you want it to be with xampp Download 8.0.14 and uninstall the old one
BTW: you can uninstall wordpress we dont need it anymore
If you want to ask why all of that!!. i will till you because the MySQL server from the wordpress instalation is extremly slow and you dont want to run 2 port and 2 MySQL
Let me know what you got :)