CSS-before-After
CSS
September 15, 2017

Hide list items after certain number (nth-of-type, nth-child)

Its an interesting CSS property through which you can define property for particular list items…
Read More
wordpress2
Wordpress
July 11, 2017

What is WordPress Child Theme?

A child theme is a theme that inherits the functionality and styling of another theme,…
Read More
zippyshare
Linux
April 17, 2016

Download a file from Zippyshare using command.

Command to download from Zippyshare Open up the terminal & use the following command wget…
Read More
Wordpress
April 8, 2016

Embed a site example

Embedding a site can be done with a code below "iframe" width="560" height="315" src="http://www.w3schools.com" frameborder="0"…
Read More
Linux
March 29, 2016

How to delete a folder in command line?

Use the following command to delete the folder in command line. *Before executing following command…
Read More
Pingdom Test
SEO
March 29, 2016

List of sites to test the speed of Website & optimization tips

Creating a perfect site takes a lot of skill & time. Even after site is…
Read More

In wordpress, wp-config.php contains the major information which connects a site to database.

Generally it looks like,

define('DB_NAME', 'my-database');
define('DB_USER', 'my-username');
define('DB_PASSWORD', 'my-password');
define('DB_HOST', 'localhost');

Value of DB_HOST varies from hosting company to company – though it is “localhost” most of the time.

In rare case, DB_HOST is called by $_ENV{DATABASE_SERVER}, which looks like :
define('DB_HOST', $_ENV{DATABASE_SERVER});

This is also a trick to catch the name of Database Host automatically

To get the name of DB_HOST, simply create a .php file with any name and put the following value with php opening tag

echo $_ENV{DATABASE_SERVER};

Hope this helps!

By | Wordpress | No Comments