Knowledgebase Home / WordPress: Error Establishing a Database Connection

WordPress: Error Establishing a Database Connection

This error means that WordPress cannot connect to the database. Usually, there’s a few reaasons why this error is displayed:

  • database server if offline
  • incorrect database username
  • incorrect database name
  • incrrect database host

In the wp-config.php file, you will see the following lines:

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define( ‘DB_NAME’, ‘database_name_here‘ );

define( ‘DB_USER’, ‘username_here‘ );

/** MySQL database password */
define( ‘DB_PASSWORD’, ‘password_here‘ );

/** MySQL hostname */
define( ‘DB_HOST’, ‘localhost‘ );

On VeeroTech Systems hosting plans, the “DB_HOST” will always be localhost.

The database connection details will always be in the format shown above & must match your mySQL database/username from inside of cPanel.

If the steps above listed in this article do not resolve your issue, please feel free to open a support ticket and we’d be happy to take a look.

Our Guiding Principles

  • Provide consistent, stable and reliable web hosting services.
  • Ensure rapid ticket response and quick resolutions to issues.
  • Never saturate or over-provision servers to ensure stability and speed for our customers.
  • Use only high quality enterprise-class hardware to ensure minimal downtime from hardware failures.
  • Provide clear pricing with no hidden fees or gotchas.