Title: Error establishing a database connection
Last modified: August 21, 2016

---

# Error establishing a database connection

 *  [andreilaihiala](https://wordpress.org/support/users/andreilaihiala/)
 * (@andreilaihiala)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-516/)
 * I do everything right.
 * But still i get “Error establishing a database connection”.
 * my website is : [korsanjack.com](http://korsanjack.com)
 * P.S: When i drag and drop wp-config.php file(modified from wp-config-sample.php),
   can not connect to server.
 * Please help me.

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

 *  [Abhishek Ghosh](https://wordpress.org/support/users/abhishek_ghosh/)
 * (@abhishek_ghosh)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-516/#post-4057536)
 * Where is your WordPress ?
 * `http://korsanjack.com/wp-login.php`
 * Its throwing 404 instead of redirecting or opening. Delete that `index.html` 
   file by the way :
 * `http://korsanjack.com/index.html`
 * It will be on the FTP root of Public folder.
 * Modifying wp-config-sample.php is the classical method and works for all (thats
   why its said officially). “can not connect to server” means you have given wrong
   info (username/password/databasename/database username etc).
 * Actually just opening the domain in browser after uploading wordpress itself 
   redirects to a page that says there is no wp-config.php file and asks whether
   to create it. Depending on server setup, wp-config.php can be created in this
   way. Next step throws a webform to fill up the database name, host name etc. 
   then proceed and install.
 *  [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * (@catacaustic)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-516/#post-4057589)
 * If you are getting that error it means that you have at least one incorrect value
   in the `wp-config.php` file. Normally this is a password that’s been spelt incorrectly,
   or the host name is not the correct one. You will need to double-check this with
   your hosting company as they will know the correct values to enter.

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

The topic ‘Error establishing a database connection’ is closed to new replies.

## Tags

 * [database connection](https://wordpress.org/support/topic-tag/database-connection/)

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 2 replies
 * 3 participants
 * Last reply from: [catacaustic](https://wordpress.org/support/users/catacaustic/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/error-establishing-a-database-connection-516/#post-4057589)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
