Title: Error message: Cannot connect to database server
Last modified: March 10, 2022

---

# Error message: Cannot connect to database server

 *  [cbiweb](https://wordpress.org/support/users/cbiweb/)
 * (@cbiweb)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-message-cannot-connect-to-database-server/)
 * I’ve had to take over as Webmaster for a site whose original Webmaster passed
   away recently. This has resulted in a transition period for the owner of the 
   site. Part of this process has been for me to move the site to another server.
 * Everything has gone well, but at this point when I try to open the site in a 
   browser, all I get is this message:
 * _Cannot connect to database server_
 * There is nothing else to that message, and no emails are automatically sent to
   my address with further information.
    I have checked wp-config.php, and everything
   is correct.
 * What else should I check?
    -  This topic was modified 4 years, 3 months ago by [t-p](https://wordpress.org/support/users/t-p/).
      Reason: Moved to Fixing WordPress from Installing WordPress
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ferror-message-cannot-connect-to-database-server%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-message-cannot-connect-to-database-server/#post-15443875)
 * Please try reviewing [https://wordpress.org/support/article/common-wordpress-errors/#error-establishing-database-connection](https://wordpress.org/support/article/common-wordpress-errors/#error-establishing-database-connection)
 *  Thread Starter [cbiweb](https://wordpress.org/support/users/cbiweb/)
 * (@cbiweb)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-message-cannot-connect-to-database-server/#post-15443909)
 * Good reading but doesn’t offer any suggestions that I haven’t already tried. 
   🙂
 * The odd part is I can still access wp-admin.
 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-message-cannot-connect-to-database-server/#post-15443961)
 * > Part of this process has been for me to move the site to another server
 * Did you follow this guide?
 * > [Moving WordPress](https://wordpress.org/support/article/moving-wordpress/)
 * If not, please review and see if anything at miss.
 * You may also want to discuss this issue with your new hosting provider.
 *  [Dion](https://wordpress.org/support/users/diondesigns/)
 * (@diondesigns)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/error-message-cannot-connect-to-database-server/#post-15445877)
 * If you add the following two lines to your wp-config.php file:
 *     ```
       define('WP_DEBUG', true);
       define('WP_DEBUG_DISPLAY', true);
       ```
   
 * WordPress will display the full error message generated by MySQL. The `WP_DEBUG`
   constant should already be in your wp-config.php file; change it to `true` if
   it’s set to false, and add the second line immediately after it.
 * Once you debug the issue, remove the second line.
 * For what it’s worth, getting that error message intermittently is almost always
   due to MySQL being overloaded.

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

The topic ‘Error message: Cannot connect to database server’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Dion](https://wordpress.org/support/users/diondesigns/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/error-message-cannot-connect-to-database-server/#post-15445877)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
