Get Wordpress Database Credentials
Posted:
Saturday, May 25th, 2013Last modified:
Thursday, April 9th, 2015Topics:
WordPressQuickly retrieve Wordpress DB info from a terminal
The following command will return the database credential information from a Wordpress installation's wp-config.php file.
cat wp-config.php | grep DB_ #
Example
$ cat wp-config.php | grep DB_ define('DB_NAME', 'dbname'); define('DB_USER', 'dbuser'); define('DB_PASSWORD', 'dbpassword'); define('DB_HOST', 'localhost'); define('DB_CHARSET', 'utf8'); define('DB_COLLATE', '');
Available Wiki Topics
The operator of this site makes no claims, promises, or guarantees of the accuracy, completeness, originality, uniqueness, or even general adequacy of the contents herein and expressly disclaims liability for errors and omissions in the contents of this website.