skip to Main Content

I want to install WordPress Locally with XAMPP but run into a critical error during the second step of the installation. I’m following the easy steps on this guide.

As you can see here, I’ve made a database called "webshop":
MySQL

And correctly entered the information in the WordPress setup:
Setup Screen

But it will end up with this error message:
Critical error

So as workaround I filled in the necessary info into the wp-config-sample.php file, and renamed it to wp-config.php like so:

WP-config file

But end up getting this error message when I go to the website directory on my browser:

Fatal error: Uncaught mysqli_sql_exception: Table ‘webshop.wp_options’ doesn’t exist in D:ToolsXAMPhtdocswebshopwp-includeswp-db.php:2056 Stack trace: #0 D:ToolsXAMPhtdocswebshopwp-includeswp-db.php(2056): mysqli_query(Object(mysqli), ‘SELECT option_n…’) #1 D:ToolsXAMPhtdocswebshopwp-includeswp-db.php(1945): wpdb->_do_query(‘SELECT option_n…’) #2 D:ToolsXAMPhtdocswebshopwp-includeswp-db.php(2695): wpdb->query(‘SELECT option_n…’) #3 D:ToolsXAMPhtdocswebshopwp-includesoption.php(284): wpdb->get_results(‘SELECT option_n…’) #4 D:ToolsXAMPhtdocswebshopwp-includesfunctions.php(1730): wp_load_alloptions() #5 D:ToolsXAMPhtdocswebshopwp-includesload.php(752): is_blog_installed() #6 D:ToolsXAMPhtdocswebshopwp-settings.php(159): wp_not_installed() #7 D:ToolsXAMPhtdocswebshopwp-config.php(96): require_once(‘D:ToolsXAMPh…’) #8 D:ToolsXAMPhtdocswebshopwp-load.php(50): require_once(‘D:ToolsXAMPh…’) #9 D:ToolsXAMPhtdocswebshopwp-blog-header.php(13): require_once(‘D:ToolsXAMPh…’) #10 D:ToolsXAMPhtdocswebshopindex.php(17): require(‘D:ToolsXAMPh…’) #11 {main} thrown in D:ToolsXAMPhtdocswebshopwp-includeswp-db.php on line 2056

2

Answers


  1. Chosen as BEST ANSWER

    By using an older version of XAMPP I figured out that the latest version of Wordpress is incompatible with the Latest version of XAMPP (8). I used 7 and it works the way it should now.


  2. 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

    C:Bitnamiwordpress-5.8.3-0appswordpresshtdocs

    To
    C:xampphtdocswordpress

    and then edit the wp-config.php in xampp copied wordpress.

    in the wp-config.php

    /** The name of the database for WordPress */
    define( 'DB_NAME', 'bitnami_wordpress' );
    
    /** MySQL database username */
    define( 'DB_USER', 'bn_wordpress' );
    
    /** MySQL database password */
    define( 'DB_PASSWORD', 'Go_Hacker_Nothing_to_see_here XD' );
    
    /** MySQL hostname */
    define( 'DB_HOST', 'localhost' );
    
    /** Database charset to use in creating database tables. */
    define( 'DB_CHARSET', 'utf8' );
    
    /** The database collate type. Don't change this if in doubt. */
    define( 'DB_COLLATE', '' );
    

    save it.

    -4 edit the User’s and the GRANT in the xampp phpMyAdmin
    Login then go to DB called phpmyadmin => PRIVILEGES => new User
    PRIVILEGES

    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.
    export

    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.

    edit-PRIVILEGES

    enter image description here

    9- in the wp-config.php edit this

    define(‘WP_TEMP_DIR’,
    ‘C:Bitnamiwordpress-5.8.3-0/apps/wordpress/tmp’);

    To
    define(‘WP_TEMP_DIR’, ‘C:xampphtdocswordpresstemp’);

    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 If you dont want to do all 11 steps.

    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 🙂

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search