Support » Installing WordPress » Error establishing a database connection

  • Hi, I need some help configuring the wp-config-sample.php, can anyone show me some examples of a working config, thanks, look forward to hearing a reply.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Well, wp-config-sample.php is an example.

    Specifically which part are you having a problem with?

    Moderator James Huff


    Halfelf Minion 🚀

    Since the Codex is down right now, take a look at this Google cached page:

    Ok, this is now what I tried:

    // ** MySQL settings ** //
    define(‘DB_NAME’, ‘website_wordpress’); // The name of the database
    define(‘DB_USER’, ”website_wordpress’); // Your MySQL

    define(‘DB_PASSWORD’, ‘pass’); // …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 to wp-

    includes/languages and set WPLANG to ‘de’
    // to enable German language support.
    define (‘WPLANG’, ”);

    /* Stop editing */

    define(‘ABSPATH’, dirname


    And I get this error:

    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.

    Any ideas?

    [Moderated — please ask a new question in a new post]

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error establishing a database connection’ is closed to new replies.