'wp-config.php is configured but database makes no connection

I am trying to repare my wordpress website. I installed XAMPP and made a database, but I get install.php when I want to acces my website. I tried a few things:

  • rename DB_NAME, DB_USER and DB_PASSWORD to match the database in wp-config.php
  • created a database with the information which was allready in wp-confif.php
  • I tried to repair the website using define(‘WP_ALLOW_REPAIR’, true);. I got errors where the database was unable to find a few tables.

I really would like to make my website work again so I can continue on my project.

Any help would be appriciated!



Solution 1:[1]

Seem there are missing step, please follow this step to install your Wordpress.

XAMPP ENVIRONMENT

  1. Download from here https://wordpress.org/download/ and Unzip the folders

  2. Put the folder inside XAMPP localhost folder

  3. Create a database for WordPress in XAMPP phpmyadmin (Make sure the table inside database are empty)

  4. Find and rename wp-config-sample.php to wp-config.php, then edit

    Database Name – Database Name used by WordPress

    Database Username – Username used to access Database. (Usually I type this value as root )

    Database Password – Password used by Username to access Database (If my DB username value is root, I will set the value as empty string)

  5. Run the WordPress installation script by accessing the URL in a web browser. For example, you should visit: http://localhost/blog/

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fiido93