Title: WordPress always points to localhost database
Last modified: October 3, 2020

---

# WordPress always points to localhost database

 *  Resolved [kwilyan](https://wordpress.org/support/users/kwilyan/)
 * (@kwilyan)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wordpress-always-points-to-localhost-database/)
 * I tried to migrate my MySQL installation to a new server. Both new and old servers
   are in the same intranet.
 * Tried many times to change the wp-config.php file to new server but no avail 
   and it always fail with ” we can’t contact the database server at localhost”.
   However, clean new installation works.
 * It seems WordPress is always stuck at “localhost” database no matter what the`
   DB_HOST` content are. This also occurs in another existing installations. Please
   help.

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

 *  Thread Starter [kwilyan](https://wordpress.org/support/users/kwilyan/)
 * (@kwilyan)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wordpress-always-points-to-localhost-database/#post-13488436)
 * Sorry, wrong forum
 *  [jheone](https://wordpress.org/support/users/jheone/)
 * (@jheone)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wordpress-always-points-to-localhost-database/#post-13509714)
 * Have been facing the same.
 * [Home Dust](https://homedust.com/)
 *  [alixahays](https://wordpress.org/support/users/alixahays/)
 * (@alixahays)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wordpress-always-points-to-localhost-database/#post-13522657)
 * Are you seeing the ‘Error establishing a database connection’ notice on your 
   WordPress website? It is a fatal error that makes your WordPress website inaccessible
   to the users.[Buy Roxy 30mg Online](https://worldmedshop.com/)
 * This error occurs when WordPress is unable to make a connection to the database.
   [Buy Ambien 10Mg (Zolpidem) Online Generic](https://worldmedshop.com/)
    A number
   of things can affect your WordPress database connection which makes it a bit 
   difficult for beginners to troubleshoot.[Buy Vicodin Tablet Online](https://worldmedshop.com/)
 * In this article, we will show you how to easily fix the error establishing a 
   database connection in WordPress[Buy Suboxone Online](https://worldmedshop.com/)

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

The topic ‘WordPress always points to localhost database’ is closed to new replies.

 * In: [Networking WordPress](https://wordpress.org/support/forum/multisite/)
 * 3 replies
 * 3 participants
 * Last reply from: [alixahays](https://wordpress.org/support/users/alixahays/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/wordpress-always-points-to-localhost-database/#post-13522657)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
