• Hello!

    For couple of days I have been trying and trying to install WordPress on a local host but i faced the same problem over and over again. First I tried installing the app via Xampp and now I tried on Wamp but the result is the same. I set everything as it has to be – I watched countless tutorials on how to install WordPress.
    Let;s start form here – I firs install Xampp/Wamp and change the port (to 8080) for example, because my other port 80 is already taken.
    Then I go to phpMyadmin and make new user wordpress with password wordpress and a database wordpress.
    After that I download the wordpress app and unzip it in the root of the Xampp/Wamp program.
    Now I have encountered two different problems.
    The first problem is if I change the configuration file in the wordpress folder and rewrite it with all the information needed (username/database/ password: wordpress and localhost:8080). When i try to access the wordpress directory form the browser by typing localhost:8080/wordpress (as is the name of the directory) the borwser displays “waiting on localhost” and after a couple of time an database error occurs that says “Error establishing a database connection”.
    The second problem that occur is if I don’t touch the configuration file at all – not filling the needed information. With this scenario, when I try to access the wordpress directory vie the browser, the installation of the application begins. I choose the language that I want and proceed to the page where I have to fill database, username, password, to set localhost to port :8080 and etc. So after I fill the information and proceed with the installation, again the message from the browser “waiting on local host” is displayed and after a minute or so, again the database error appears.

    Please help because I think that at this point I have tried everything – trying different ports, filling localhost as 127.0.0.1:8080 and nothing happens. I do not understand much of web servers, but I think that I have done everything correctly and there is still a problem.

Viewing 14 replies - 1 through 14 (of 14 total)
  • you should leave the input field called Database Host to localhost not 8080

    Thread Starter immortalfiresz

    (@immortalfiresz)

    Also tried that but still getting “Error establishing a database connection”…

    Hi, you may massage your local host regarding WordPress installation guide.

    Thread Starter immortalfiresz

    (@immortalfiresz)

    I am trying to install WordPress on Xampp/Wamp. I am not using host.

    Thread Starter immortalfiresz

    (@immortalfiresz)

    I ran the WP_Debug on true and this is what it displays after the timeout:

    Warning: mysqli_real_connect(): MySQL server has gone away in H:\Bitnami\apache2\htdocs\wordpress\wp-includes\wp-db.php on line 1538

    Warning: mysqli_real_connect(): Error while reading greeting packet. PID=5732 in H:\Bitnami\apache2\htdocs\wordpress\wp-includes\wp-db.php on line 1538

    Warning: mysqli_real_connect(): (HY000/2006): MySQL server has gone away in H:\Bitnami\apache2\htdocs\wordpress\wp-includes\wp-db.php on line 1538

    Dion

    (@diondesigns)

    Both Xampp and WAMP come with phpMyAdmin. Try to load it; does it work? If not, then you have a problem with MySQL. If so, you should see the host and port connection information on the main page. Let’s say the host was localhost and port was 3306. You would combine the two as “localhost:3306” and enter that into WordPress for DB_HOST.

    Thread Starter immortalfiresz

    (@immortalfiresz)

    @diondesigns I can access phpmyadmin by typing localhost:81/phpmyadmin in the browser, because the default port 80 is already taken.
    So I changed the DB_HOST in the WP configuration file. Then I type localhost:81/wordpress in the browser and the following message appears:

    Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘wordpress’@’localhost’ (using password: YES) in H:\Bitnami\apache2\htdocs\wordpress\wp-includes\wp-db.php on line 1538

    Could the problem be because I am using router and the cable for the internet is going from the router to my PC and it’s not a direct cable?

    Hi, Please do the below changes in thewp-config.php file.

     /** MySQL hostname */
    -define('DB_HOST', 'localhost');
    +define('DB_HOST', '127.0.0.1');
    Thread Starter immortalfiresz

    (@immortalfiresz)

    @anujajakhade I tried, but still no results.

    Can someone please tell me a way to free the default port 80 for localhost. Maybe this way it will work, if I try to install the WP app using the default port.

    Dion

    (@diondesigns)

    I can access phpmyadmin by typing localhost:81/phpmyadmin in the browser, because the default port 80 is already taken.

    The database runs on a completely different port than the webserver. That’s why I asked you to look on the phpMyAdmin intro page; if a custom port is being used, it should list that port.

    If a port is listed in phpMyAdmin, use that port. If a port is not listed, try using port 3306, which is the default port for MySQL. Also make sure to use the hostname that’s listed in phpMyAdmin.

    You can also look in the MySQL configuration file. I believe that both Xampp and WAMP give you the ability to view and edit this file, which will be named either my.cnf or my.ini.

    Thread Starter immortalfiresz

    (@immortalfiresz)

    @diondesigns I did try to replace localhost with localhost:3306 in WP conf. file but to no avail.

    PS: This is how my phpmyadmin looks like and how my WP conf. file looks like:

    https://i222.photobucket.com/albums/dd305/georgich/Capture_2.jpg
    https://i222.photobucket.com/albums/dd305/georgich/Capture1_2.jpg

    Dion

    (@diondesigns)

    Hmm. You seem to have an old version of phpMyAdmin.

    Please find the config.inc.php file in the phpMyAdmin installation directory. You should see one or both of the following lines:

    $cfg['Servers'][$i]['host'] = '(something)'
    $cfg['Servers'][$i]['port'] = '(something)'
    

    These are the values you need for WordPress. If only the host line is present, then you do not need to specify a port.

    Thread Starter immortalfiresz

    (@immortalfiresz)

    @diondesigns I finally was able to free the default port 80 and the installation of WordPress loaded normally and for now everything works out fine.

    Thanks to everyone for trying to help me out.

    @immortalfiresz:

    “I finally was able to free the default port 80 and the installation of WordPress loaded normally and for now everything works out fine.”

    HOW did you free the default port?

    • This reply was modified 7 years, 4 months ago by Eric Hepperle. Reason: changed markup
    • This reply was modified 7 years, 4 months ago by Eric Hepperle.
Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Problem installing WordPress locally’ is closed to new replies.