Support » Fixing WordPress » Table ‘…’ doesn’t exist

  • I had Windows 10 on computer. I used XAMPP and WordPress. All worked good. Some days ago I update Windows to Windows 11. I installed XAMPP and try to install WordPress(I download WP from wordpress.org; unzip it and put it in folder C:\xampp\htdocs\www and I made db for my site). Then I try to install WP I get error:
    Fatal error: Uncaught mysqli_sql_exception: Table 'trywp.wp_options' doesn't exist in C:\xampp\htdocs\www\trywp\wp-includes\wp-db.php:2056 Stack trace: #0 C:\xampp\htdocs\www\trywp\wp-includes\wp-db.php(2056): mysqli_query(Object(mysqli), 'SELECT option_n...') #1 C:\xampp\htdocs\www\trywp\wp-includes\wp-db.php(1945): wpdb->_do_query('SELECT option_n...') #2 C:\xampp\htdocs\www\trywp\wp-includes\wp-db.php(2695): wpdb->query('SELECT option_n...') #3 C:\xampp\htdocs\www\trywp\wp-includes\option.php(284): wpdb->get_results('SELECT option_n...') #4 C:\xampp\htdocs\www\trywp\wp-includes\functions.php(1730): wp_load_alloptions() #5 C:\xampp\htdocs\www\trywp\wp-includes\load.php(752): is_blog_installed() #6 C:\xampp\htdocs\www\trywp\wp-settings.php(159): wp_not_installed() #7 C:\xampp\htdocs\www\trywp\wp-config.php(96): require_once('C:\\xampp\\htdocs...') #8 C:\xampp\htdocs\www\trywp\wp-load.php(50): require_once('C:\\xampp\\htdocs...') #9 C:\xampp\htdocs\www\trywp\wp-blog-header.php(13): require_once('C:\\xampp\\htdocs...') #10 C:\xampp\htdocs\www\trywp\index.php(17): require('C:\\xampp\\htdocs...') #11 {main} thrown in C:\xampp\htdocs\www\trywp\wp-includes\wp-db.php on line 2056
    Why it happend?

Viewing 15 replies - 1 through 15 (of 24 total)
  • Load your database using the phpMyAdmin option in XAMPP.
    Is the name of your database called trywp?
    If not, you can CREATE new database called trywp, then COPY INTO from the existing database. Or, I think you could also use RENAME database to trywp.

    if trywp does exist, check the db_prefix in your wp-config file and that the table prefix matches your db:
    https://www.wpbeginner.com/wp-tutorials/how-to-change-the-wordpress-database-prefix-to-improve-security/

    Thread Starter vrpr

    (@vrpr)

    Thanks for your answer. Yes, my database called trywp and it exist, but it do not have any tables. You mean – I can take any db and import it to my trywp db ( use db with the same db_prefix how in wp-config)?
    During installation WordPress , were always created tables in the database, but now they are not created. Why?

    Hmmm …….I think I have mis-understood the initial problem.

    > I can take any db and import it to my trywp db
    No, not really.
    But it would certainly help to troubleshoot the issue.

    Is this folder path intentional?
    C:\xampp\htdocs\www\trywp\

    Bc this would load in your browser from http://localhost/www/trywp/
    I’m just making sure you didn’t mean to install under http://localhost/trywp/

    Hello!
    I’ve actually the same problem but just with setting up wordpress the first time…
    It looks like wordpress isn’t creating it’s tables in the database
    I’m really helpless at the moment…
    What could be the reason for this problem?

    Thread Starter vrpr

    (@vrpr)

    Yes, this folder path is intentional (C: \ xampp \ htdocs \ www \ trywp \). When I installed XAMPP it make folder C: \ xampp \ htdocs. I make folder ‘www’ inside ‘htdocs’ that I can place some folders with sites and make folder ‘trywp’ for site and I try to install WordPress there.
    I did it before and all worked (before I updated windows).
    It is possible to use Bitname for install WordPress on XAMPP and it makes folder ‘app/wordpress’, but this instalation was not sucsess too. Therefore I deside not use it.
    In brouser my site adress will be: http://localhost/www/trywp/

    Thread Starter vrpr

    (@vrpr)

    @alfredpoh,
    do you use windows 11? Yes, I try install WordPress and it do not make tables in db. When I had windows 10 on my computer I can install WordPress without any problem.

    Did you post into the xampp community group?
    Version 8.0.0-1 references the mysqli extension missing:
    https://community.apachefriends.org/f/viewtopic.php?f=16&t=8010

    Solution defined here:
    https://community.apachefriends.org/f/viewtopic.php?f=16&t=80105#p270758

    Topics:
    https://community.apachefriends.org/f/viewforum.php?f=16

    Thread Starter vrpr

    (@vrpr)

    Thanks a lot! I think I’ll find the answer on these links.
    Yes, of course, I visited the xampp community group, but unfortunately the first thing I did was read the rules and it says that they do not answer questions on WordPress. I thought that installing WordPress is also a poll about WordPress and went to wordpress.org

    @vrpr: no I’m still using win10.

    @corrinarusso: it seems that the provided solution in your link is already fixed at xampp V8.0.13 … so I’ve to keep looking…

    I tried it with xampp V7.3.33 now… and it looks good… so there might be another bug in xampp…

    Thread Starter vrpr

    (@vrpr)

    I looked at my old computer – it was XAMPP 7.3.2 and it worked well. I will try to install this version.

    I don’t know if it’s related, but this is the only post I could find with this error on that specific file and line.

    I have a fresh installation of WordPress on a live Host, and a plugin is throwing this same error when I try to activate it.

    Fatal error:
    Uncaught mysqli_sql_exception:

    Table <table name>

    doesn’t exist in ..wp-includes/wp-db.php:2056

    The table had not been created in the DB.
    I tried creating the table myself, but it didn’t help.

    • This reply was modified 1 year, 3 months ago by GreenPanda.

    It seems that lowering the PHP version to 7.3 allows it to work. On the current PHP version still isn’t working.

    • This reply was modified 1 year, 3 months ago by GreenPanda.
    • This reply was modified 1 year, 3 months ago by GreenPanda.

    Okay – I would close this conversation here, and it would seem to be a XAMPP bug, not a WordPress bug.

    Thread Starter vrpr

    (@vrpr)

    @binarybrew
    I have never had any problems with real hosting. Maybe you need to contact the support of this hosting?
    What plugin is throwing this same error?

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘Table ‘…’ doesn’t exist’ is closed to new replies.