Title: Problem installing WordPress locally
Last modified: May 29, 2017

---

# Problem installing WordPress locally

 *  [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/)
 * 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)

 *  [Omar Kasem](https://wordpress.org/support/users/omarkasem/)
 * (@omarkasem)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9178135)
 * you should leave the input field called Database Host to localhost not 8080
 *  Thread Starter [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9178149)
 * Also tried that but still getting “Error establishing a database connection”…
 *  [krazydoublek](https://wordpress.org/support/users/krazydoublek/)
 * (@krazydoublek)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9179618)
 * Hi, you may massage your local host regarding WordPress installation guide.
 *  Thread Starter [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9179766)
 * I am trying to install WordPress on Xampp/Wamp. I am not using host.
 *  Thread Starter [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9179886)
 * 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](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9180243)
 * 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](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9180593)
 * [@diondesigns](https://wordpress.org/support/users/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?
 *  [anujajakhade](https://wordpress.org/support/users/anujajakhade/)
 * (@anujajakhade)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9182510)
 * Hi, Please do the below changes in the`wp-config.php` file.
 *     ```
        /** MySQL hostname */
       -define('DB_HOST', 'localhost');
       +define('DB_HOST', '127.0.0.1');
       ```
   
 *  Thread Starter [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9183456)
 * [@anujajakhade](https://wordpress.org/support/users/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](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9183708)
 * > 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](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9184615)
 * [@diondesigns](https://wordpress.org/support/users/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:
 * [http://i222.photobucket.com/albums/dd305/georgich/Capture_2.jpg](http://i222.photobucket.com/albums/dd305/georgich/Capture_2.jpg)
   
   [http://i222.photobucket.com/albums/dd305/georgich/Capture1_2.jpg](http://i222.photobucket.com/albums/dd305/georgich/Capture1_2.jpg)
    -  This reply was modified 9 years ago by [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/).
    -  This reply was modified 9 years ago by [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/).
    -  This reply was modified 9 years ago by [immortalfiresz](https://wordpress.org/support/users/immortalfiresz/).
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9185977)
 * 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](https://wordpress.org/support/users/immortalfiresz/)
 * (@immortalfiresz)
 * [9 years ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9188118)
 * [@diondesigns](https://wordpress.org/support/users/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.
 *  [Eric Hepperle](https://wordpress.org/support/users/codeslayer2010/)
 * (@codeslayer2010)
 * [8 years, 11 months ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9303348)
 * [@immortalfiresz](https://wordpress.org/support/users/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 8 years, 11 months ago by [Eric Hepperle](https://wordpress.org/support/users/codeslayer2010/).
      Reason: changed markup
    -  This reply was modified 8 years, 11 months ago by [Eric Hepperle](https://wordpress.org/support/users/codeslayer2010/).

Viewing 14 replies - 1 through 14 (of 14 total)

The topic ‘Problem installing WordPress locally’ is closed to new replies.

## Tags

 * [installation](https://wordpress.org/support/topic-tag/installation/)
 * [WAMP](https://wordpress.org/support/topic-tag/wamp/)
 * [xampp](https://wordpress.org/support/topic-tag/xampp/)

 * In: [Localhost Installs](https://wordpress.org/support/forum/localhost-installs/)
 * 14 replies
 * 6 participants
 * Last reply from: [Eric Hepperle](https://wordpress.org/support/users/codeslayer2010/)
 * Last activity: [8 years, 11 months ago](https://wordpress.org/support/topic/problem-installing-wordpress-locally-2/#post-9303348)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
