• nika23

    (@nika23)


    Hello,

    I’m trying to install WP with XAMPP and every time I get to entering database connection details which are –

    *Database Name – testwp
    *User Name – root
    *Password – I leave it blank
    *Database Host – localhost
    *Table Prefix – wp_

    It gives me this error message –

    Error establishing a database connection

    This either means that the username and password information in your wp-config.php file is incorrect or we can’t contact the database server at localhost. This could mean your host’s database server is down.

    Are you sure you have the correct username and password?
    Are you sure that you have typed the correct hostname?
    Are you sure that the database server is running?

    If you’re unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.

    Try again

    I even tried to create wp-config.php file manually but it gives me another error message –

    The file ‘wp-config.php’ already exists. If you need to reset any of the configuration items in this file, please delete it first. You may try installing now.
    I clicked install now but then it displays the same Error establishing a database connection.

    Can anyone tell me what I am doing wrong please?
    Many thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • snifflevalve

    (@snifflevalve)

    1. did you first create the testwp database in phpMyAdmin?
    2. is the MySQL server running?

    Thread Starter nika23

    (@nika23)

    Yes, I did create testwp database in phpMyAdmin and then run the installation of WP.
    And yes, MySQL server is running.

    snifflevalve

    (@snifflevalve)

    Then those database credentials should work ?? Other than the db name, that is what I use all the time with XAMPP.

    A couple other things to try:

    – do you get the XAMPP dashboard page when you enter just localhost into you browser?
    – perhaps try 127.0.0.1 instead of localhost in the db setup page (or wp-config)

    Also, which operating system are you using? Win, Mac, Linux?

    Thread Starter nika23

    (@nika23)

    I just tried to type 127.0.0.1 instead of localhost but it gives me the same error message.
    And yes, I do get the xampp dashboard page when I type localhost in my browser – is that wrong?
    I am using Win system

    Thread Starter nika23

    (@nika23)

    I sorted it out. I re-installed XAMPP and it is working fine now. I think it must have been old version of XAMPP and that’s why it wasn’t working.

    By the way, here is great explanation of “How to Install XAMPP and WordPress Locally on PC/Windows” – https://premium.wpmudev.org/blog/setting-up-xampp/
    Well worth reading for anyone having problem with installation!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘XAMPP and WP installation’ is closed to new replies.