Sunday, January 2, 2022

[FIXED] Manually install wordpress locally on windows 10 problem

Issue

I'm new to wordpress. I try to install wordpress on windows 10 with Mysql8.0, PHP8.1.0, Apache24 and wordpress5.8.2. At first, the installation process is stuck in creating wp-config.php with the error "PHP Fatal error: Uncaught mysqli_sql_exception: Unknown column 'wp_' in 'field list' in". The wp-config.php is created when i comment the lines 317 to 322 in wp-admin\setup-config.php. I continue to install the wordpress. The next error is:

PHP Fatal error:  Uncaught mysqli_sql_exception: Table 'wordpress.qlj_options' doesn't exist in D:\Program Files\Apache24\htdocs\wordpress\wp-includes\wp-db.php:2056
Stack trace:
#0 D:\Program Files\Apache24\htdocs\wordpress\wp-includes\wp-db.php(2056): mysqli_query(Object(mysqli), 'SELECT option_v...')
#1 D:\Program Files\Apache24\htdocs\wordpress\wp-includes\wp-db.php(1945): wpdb->_do_query('SELECT option_v...')
#2 D:\Program Files\Apache24\htdocs\wordpress\wp-includes\wp-db.php(2581): wpdb->query('SELECT option_v...')
#3 D:\Program Files\Apache24\htdocs\wordpress\wp-includes\functions.php(1734): wpdb->get_var('SELECT option_v...')
#4 D:\Program Files\Apache24\htdocs\wordpress\wp-includes\load.php(752): is_blog_installed()
#5 D:\Program Files\Apache24\htdocs\wordpress\wp-settings.php(159): wp_not_installed()
#6 D:\Program Files\Apache24\htdocs\wordpress\wp-config.php(97): require_once('D:\\Program File...')
#7 D:\Program Files\Apache24\htdocs\wordpress\wp-load.php(50): require_once('D:\\Program File...')
#8 D:\Program Files\Apache24\htdocs\wordpress\wp-admin\install.php(36): require_once('D:\\Program File...')
#9 {main}
  thrown in D:\Program Files\Apache24\htdocs\wordpress\wp-includes\wp-db.php on line 2056

It seems to require database before creating it. I think this error is the same with the first.

Can anyone please help?


Solution

I am so excited that i installed the wordpress. Here is what i did. First, I manually created all the default tables that wordpress needs in database(you can find the sql in wp-admin/includes/schema.php), then i tried to repair the database using url wp-admin/maint/repair.php. It showed so many deprecated errors and warnings of PHP. So i thought maybe the version of PHP is not right. I tried to use PHP-7.4.27 instead of PHP8 and deleted all the tables created before. Then everything just done.

My English is not very good. I hope you can understand what i'm saying.

enter image description here



Answered By - Linjing Que

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.