• I’m trying to install wordpress locally, however, I’ve been running into a lot of issues starting with this page:

    “Before getting started
    Welcome to WordPress. Before getting started, we need some information on the database. You will need to know the following items before proceeding.

    Database name
    Database username
    Database password
    Database host
    …”

    So I update my wp-config-sample.php file by putting my DB name: ‘learningWordPress’, DB username: ‘root’, DB password: ‘root’, and DB host: ‘localhost:3306’ (It’s that port because if I go to xamp and click config, service and portsettins, and then MySQL, it says it’s running on mainport 3306).

    then I inputed all that information to install wordpress and I get an error establishing database connection.

    Then I found somewhere that you’re supposed to rename the wp-config-sample.php file to wp-config.php. However, when I did that, I got this error:

    ‘Sorry, I need a wp-config-sample.php file to work from. Please re-upload this file to your WordPress installation.’

    Then I tried to just have both files ‘wp-config-sample.php’ and ‘wp-config.php’ and that did not work either. Are there any experts out there who know how to solve these issues?

Viewing 3 replies - 1 through 3 (of 3 total)
  • When you create your own wp-config.php file like that you need to go back to step 1 and re-start the imstallation process again. Trying to do it from the database installation page will cause that error to show up.

    As @catacaustic has said, if you create your own wp-config.php then you are completing the process which the “Before getting started” portion of the setup would normally do for you.

    I’d put a fresh copy of wp-config-sample.php into the root directory and then browse to your installation path and complete the “Before getting started” section by entering your Database name, Database username, Database password, Database host into the fields provided and click “Submit”. If you get a success message afterwards then your WP installation and your database can now communicate and you’ll then proceed on and run through the famous 5-minute installation where you can set up Site Title and your WP Dashboard username, password and email details.

    Hope this helps.

    When I manually WordPress installation, usually I am not change the wp-config-sample.php. To avoid getting error for installation step, I create a new wp-config file, (wp-config.php), and then edit the database file instead. And if possible, you can save this php file if in the future you want to install another site, so you just upload that files.

    • This reply was modified 6 years, 11 months ago by indoteguh.
Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Creating connection with database’ is closed to new replies.