Jump to content

Wordpress Installation


Recommended Posts

I am trying to install WordPress to a subdomain using the instructions I found here.


The error is:

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.


Are you sure you have the correct username and password?

Are you sure that you have typed the correct hostname?

Are you sure that the database server is running?

If you're unsure what these terms mean you should probably contact your host. If you still need help you can always visit the WordPress Support Forums.



My wp-config.php is:


// ** MySQL settings ** //

define('my-cpanel-name_database-name-I-created', 'wordpress'); // The name of the database

define('my-cpanel-name_user-I-created', 'username'); // Your MySQL username

define('password-I-created', '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_'


// Change this to localize WordPress. A corresponding MO file for the

// chosen language must be installed to wp-includes/languages.

// For example, install de.mo to wp-includes/languages and set WPLANG to 'de'

// to enable German language support.

define ('WPLANG', '');


/* Stop editing */


define('ABSPATH', dirname(__FILE__).'/');




for the the fourth define, localhost, I have tried both leaving 'DB-HOST' and replacing it with 'localhost' - I still got the error message.


When creating the database and user, I did remember (the second time) to add the user to the database. I even practiced by adding to users I will delete. After adding them, I get the connection strings for them, which means they are added to database, right?


Any other suggestions on what could be wrong with the database connection?


Thank you.


Edited by goatgirl
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...