• I am trying to setup WordPress on my computer. I have installed and successfully setup Apache and MySQL and using XAMPP as recommended in the following tutorial: https://www.adobe.com/devnet/dreamweaver/articles/dw_wordpress_pt2.html

    I am at the point where I type “localhost:8080/wordpress” in my browser and it tells me no config found, would I like to set it up, and I continue. I enter my database name, userid, and password and leave localhost as it is, and it comes back with:

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

    So I figure it must be because I had to use ports “8080” since Apache would not start with it setup on 80. I changed this in the /apache/conf/httpd.conf file under “Listen 80” to “Listen 8080.” I also changed “ServerName localhost:80” to “ServerName localhost:8080.”

    When I enter localhost:8080 as my “database host” in the wordpress configuration setup, I am relieved to see no error message, but then it just loads forever and ultimately times out. But the url does change from “https://localhost:8080/wordpress/wp-admin/setup-config.php?step=1” to “https://localhost:8080/wordpress/wp-admin/setup-config.php?step=2”

    So I must be getting closer…how ever as I said it times out and when I goto the url “localhost:8080/wordpress,” it simply loops around to the fact the config is not setup and would I like to set it up now. Any ideas what am I doing wrong?

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter tariqari

    (@tariqari)

    By the way by “timing out” I am assuming that sicne on “…step=2” in the url, I just get a blank page.

    If you got to the Create a Configuration File screen and then the next one where you enter the values, then the server is set up properly.

    Here’s the issue:

    I enter my database name, userid, and password and leave localhost as it is,

    Using XAMPP, these are the default values for the DATABASE connection:

    Database Name: whatever you named it (no spaces)

    User Name: root

    Password: <empty> do not put ANYTHING in here

    Database Host: localhost

    Table Prefix: wp_ (leave as-is)

    Try that ??

    Thread Starter tariqari

    (@tariqari)

    Thanks for responding. I get the same error message as “Error establishing a database connection” when using “root” as username and blank password.

    Thread Starter tariqari

    (@tariqari)

    I should also note that this error occurs either in the blank database I setup just to see if it would work and in the original database since this is an existing wordpress I am working with.

    Thread Starter tariqari

    (@tariqari)

    Oh wait a second, actually you’re right with one exception, during the apache/mysql setup I changed the “root” password from blank to a password! I type in the password with user “root” and it worked! Thanks so much! In addition it worked with my imported database ??

    A couple things:

    – try it with localhost:8080 for the database host

    – if you changed the port from 80 because Apache wouldn’t start, chances are really good it’s because you have Skype running or had started it before XAMPP. If that is the case, then open Skype and from the Skype menu bar select > Tools > Options > Advanced> Connections > uncheck the box “Use port 80 and 443 as alternatives for incoming connections” > Save
    Then change Apache back to the default and try that.

    Thread Starter tariqari

    (@tariqari)

    Yeah I had tried it with localhost:8080 and thats what led to the timeout.

    I did change it because it wouldn’t start but I didn’t have Skype running that I could see. Unless you mean the service which I think might run all the time even if the software’s not open? I could try that again…

    Unfortunately I am in a new dilemma as any page I try to go to now says “HTTP Error 503. The service is unavailable.”

    Out of the frying pan and into the fire ??

    Does the home page display? What’s the URL shown?

    Can you access the WP Dashboard (log into the site)?

    What is the URL shown when you hover over one of the menu items to go to another page?

    Thread Starter tariqari

    (@tariqari)

    Nope, every single page loads up the “Service Unavailable” page. As a matter of fact, I can’t even load up the wp-config.php anymore :S

    Thread Starter tariqari

    (@tariqari)

    Ok some progress. For some reason I decided to try to type in “127.0.0.1/wordpress” instead of “localhost:8080/wordpress” and behold, it loads up a partial page with no template. Clicking or hovering the links leads me to the actual site on the remote server. So for now I just got to figure out how to get the page to look like it does on the site :/

    Thread Starter tariqari

    (@tariqari)

    Ok some new news. Decided to just rename the wp-config file to wp-config.bak and start over. Went through the setup, left host as localhost (including in the httpd.conf file, though Listen 8080). Set user to root with my chosen password and brand new clean database (not the imported one). Got the “sparky” message or whatever it says. Went through the new wordpress setup, success, logged in, and presto! The site is up on my local network. Would have liked the site to have my posts and styles and stuff but I just wanted to customize the template anyway. Hopefully I’ll figure out what went wrong with my database though in the future if anyone would like to comment. Thanks for your help 2ninerniner2!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Local WordPress Configuration Setup Timeout when connecting to localhost’ is closed to new replies.