Configure host database if you do not know


When installing WordPress one of the basic elements to connect to the database, plus the MySQL username and password is the name of the server, known as the  hostname, a fact that you usually facilitates your host but what unless you give him?

As the same home screen installing WordPress tells you, in 99% of cases the server name is localhost, but you know it's precisely is 1% which usually make war, especially when your hosting provider does not you help matters.

There are suppliers who do not use that standard, but the following:
  1. 1and1 Hosting - db12345678
  2. DreamHost -
  3. GoDaddy -
  4. ICDSoft - localhost: /tmp/mysql5.sock
  5. MediaTemple (GS) -
  6. Pair Networks -
  7. Yahoo - mysql

But if it does not work or  localhost or are in any of the above providers you can always use a trick of the configuration file  wp-config.php  to get you out of the mess on more than one occasion.

The idea is to replace the following line:
/ ** MySQL Host (you probably do not need to change) * /

        define ( 'DB_HOST' , 'localhost' );

By the following:
/ ** MySQL Host (you probably do not need to change) * /

        define ( 'DB_HOST' , $ _ENV DATABASE_SERVER {});

What makes the new line is to try to resolve the host of the database without having to enter it manually. Guards changes and in most cases will retrieve the name of your server and everything will work properly.

Members online

No members online now.