Title: ws-config.php Problem
Last modified: August 18, 2016

---

# ws-config.php Problem

 *  [Kelly](https://wordpress.org/support/users/kelly/)
 * (@kelly)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/)
 * I entered everything into the config file but I get this error:
    “Error establishing
   a database connection! This probably means that the connection information in
   youn wp-config.php file is incorrect. Double check it and try again. Are you 
   sure you have the correct user/password? Are you sure that you have typed the
   correct hostname? Are you sure that the database server is running?” I don’t 
   know if I even typed in my info in the config right.. Can someone help me?

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

 *  [carthik](https://wordpress.org/support/users/carthik/)
 * (@carthik)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44020)
 * Sure! and what help do you need?
 *  Thread Starter [Kelly](https://wordpress.org/support/users/kelly/)
 * (@kelly)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44022)
 * Is this right?
    <?php /** WordPress’s config file **/ /** [http://wordpress.org/](http://wordpress.org/)**///**
   MySQL settings ** // define(‘wp’, ‘wordpress’); // The name of the database define(‘
   Kelly’, ‘username’); // Your MySQL username define(‘********’, ‘password’); //…
   and password define(‘www.somewhere-else.net/kelly’, ‘localhost’); // 99% chance
   you won’t need to change this value // Change the prefix if you want to have 
   multiple blogs in a single database. $table_prefix = ‘wp_’; // example: ‘wp_’
   or ‘b2’ or ‘mylogin_’ /* Stop editing */ $server = DB_HOST; $loginsql = DB_USER;
   $passsql = DB_PASSWORD; $base = DB_NAME; define(‘ABSPATH’, dirname(__FILE__).’/’);//
   Get everything else require_once(ABSPATH.’wp-settings.php’); ?>
 *  [carthik](https://wordpress.org/support/users/carthik/)
 * (@carthik)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44028)
 * It should be
    ` define('DB_NAME', 'wp'); // The name of the database define('
   DB_USER', 'Kelly'); // Your MySQL username define('DB_PASSWORD', '******'); //...
   and password define('DB_HOST', 'localhost'); // 99% chance you won't need to 
   change this value  Leave the thing in Capitals unmodified. the second item within
   the ‘__’ in each “define” is what you have to specify. Cheeri-O! 🙂
 *  [NuclearMoose](https://wordpress.org/support/users/nuclearmoose/)
 * (@nuclearmoose)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44029)
 * Kelly,
    This is what one of my wp-config files looks like: <pre> // ** MySQL 
   settings ** // define(‘DB_NAME’, ‘dawsoncreek_wordpress’); // The name of the
   database define(‘DB_USER’, ‘dawsoncreek_blogger’); // Your MySQL username define(‘
   DB_PASSWORD’, ‘xxxxxxxx’); // …and password define(‘DB_HOST’, ‘localhost’); //
   99% chance you won’t need to change this value </pre> “dawsoncreek_” is what 
   my host prepends onto all my databases and database usernames. You need to find
   out if your host does something similar. Also, your user needs to be made a member
   of your database as well. HTH.
 *  Thread Starter [Kelly](https://wordpress.org/support/users/kelly/)
 * (@kelly)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44031)
 * I did what you told me, but when I go to the install.php page there are errors:
   “
   Parse error: parse error in /home/somewhe/public_html/kelly/wp/wp-config.php 
   on line 20 WordPress Fatal error: Call to a member function on a non-object in/
   home/somewhe/public_html/kelly/wp/wp-admin/install.php on line 47″
 *  [carthik](https://wordpress.org/support/users/carthik/)
 * (@carthik)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44032)
 * Line 20 looks like your last line. Delete everything, even blank spaces, and 
   lines after the last `?>` in wp-config.php and you should be good, I guess.
 *  Thread Starter [Kelly](https://wordpress.org/support/users/kelly/)
 * (@kelly)
 * [22 years, 1 month ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44035)
 * I checked again and then I edited it like you guys did it, but it went back to
   the first original error.. 🙁 It’s driving me crazy!!
    <?php /** WordPress’s 
   config file **/ /** [http://wordpress.org/](http://wordpress.org/) **/ // ** 
   MySQL settings ** // define(‘DB_NAME’, ‘wp’); // The name of the database define(‘
   DB_USER’, ‘Kelly’); // Your MySQL username define(‘DB_PASSWORD’, ‘*******’); //…
   and password define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to 
   change this value // Change the prefix if you want to have multiple blogs in 
   a single database. $table_prefix = ‘wp_’; // example: ‘wp_’ or ‘b2’ or ‘mylogin_’/*
   Stop editing */ $server = DB_HOST; $loginsql = DB_USER; $passsql = DB_PASSWORD;
   $base = DB_NAME; define(‘ABSPATH’, dirname(__FILE__).’/’); // Get everything 
   else require_once(ABSPATH.’wp-settings.php’); ?>
 *  Anonymous
 * [21 years, 6 months ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44608)
 * MySQL 4.1 uses a different authentication Hash, you will have to ‘re-save’ you
   DB_PASSWORD in mysql for it to work…
    Check without using a password and it will
   work. To ‘re-save’ you password in ‘old format’: mysql> SET PASSWORD FOR ‘some_user’@’some_host’
   = OLD_PASSWORD(‘your DB_PASSWORD’);
 *  Moderator [James Huff](https://wordpress.org/support/users/macmanx/)
 * (@macmanx)
 * [21 years, 6 months ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44609)
 * Or, if you have phpmyadmin access, just do this: [http://www.tamba2.org.uk/wordpress/phpmyadmin/](http://www.tamba2.org.uk/wordpress/phpmyadmin/)
 *  Anonymous
 * [21 years, 5 months ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44610)
 * How do you find your MySQL username?
 *  [error](https://wordpress.org/support/users/error/)
 * (@error)
 * [21 years, 5 months ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44611)
 * Your hosting provider gives it to you.

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

The topic ‘ws-config.php Problem’ is closed to new replies.

 * In: [Installing WordPress](https://wordpress.org/support/forum/installation/)
 * 11 replies
 * 6 participants
 * Last reply from: [error](https://wordpress.org/support/users/error/)
 * Last activity: [21 years, 5 months ago](https://wordpress.org/support/topic/ws-configphp-problem/#post-44611)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
