{"id":9623,"date":"2011-07-19T03:27:14","date_gmt":"2011-07-19T07:27:14","guid":{"rendered":"http:\/\/info.template-help.com\/?p=9623"},"modified":"2017-08-18T08:17:42","modified_gmt":"2017-08-18T12:17:42","slug":"checking-cms-database","status":"publish","type":"post","link":"https:\/\/www.templatemonster.com\/help\/checking-cms-database.html","title":{"rendered":"Checking CMS\/E-commerce database&amp;configuration details"},"content":{"rendered":"<p><\/p>\r\n<p>Sometimes you may need to find out your database details or change it. The best way to do it is to view configuration file in your system. Each CMS\/e-commerce engine has a different filename and path to save this data. In this tutorial you will learn the way to edit\/locate your CMS\/e-commerce configuration files and configuration data.<\/p>\r\n<h3>WordPress<\/h3>\r\n<p>Open your WordPress installation root and locate following file: <strong>wp-config.php<\/strong><\/p>\r\n<p>You will be able to see a lot of scripting, the one you need is:<\/p>\r\n<pre class=\"brush:php\">\r\ndefine('DB_NAME', '****');\r\n\/\/Database name definition\r\n\r\ndefine('DB_USER', '****');\r\n\/\/Database user name definition\r\n\r\ndefine('DB_PASSWORD', '****');\r\n\/\/Database password\r\n\r\ndefine('DB_HOST', 'localhost');\r\n\/\/Database host, usually localhost.\r\n\r\n$table_prefix  = 'wp_';\r\n<\/pre>\r\n<p>Database Prefix, &#8220;wp_&#8221; is the default one.<\/p>\r\n<h3>Joomla<\/h3>\r\n<p>Open your Joomla installation root and locate following file: <strong>configuration.php<\/strong><\/p>\r\n<p>You will be able to see some scripting, the one you need is:<\/p>\r\n<pre class=\"brush:php\">\r\nvar $dbtype = 'mysql';\r\n\/\/Database type\r\n\r\nvar $host = 'localhost';\r\n\/\/Database host, usually localhost\r\n\r\nvar $user = '****';\r\n\/\/Database user name definition\r\n\r\nvar $password = '****';\r\n\/\/Database password\r\n\r\nvar $db = '****';\r\n\/\/Database name definition\r\n\r\nvar $dbprefix = 'jos_';\r\n<\/pre>\r\n<p>Database Prefix, &#8220;jos_&#8221; is the default one.<\/p>\r\n<h3>Drupal 6<\/h3>\r\n<p>Open your Drupal installation root and locate following file: <strong>sites\/default\/settings.php<\/strong><\/p>\r\n<p>You will be able to see some scripting, the one you need is:<\/p>\r\n<pre class=\"brush:php\">\r\n$db_url = 'mysqli:\/\/root@localhost\/drupal6'; \r\n\r\n\/\/Database name, URL, login and password. It may look different, the structure is as it follows:\r\n\r\n$db_url = 'mysql:\/\/username:xxx\/databasename';\r\n\r\n$db_prefix = '';\r\n\/\/Database Prefix\r\n<\/pre>\r\n<h3>Drupal 7<\/h3>\r\n<p>You need to edit same file as for Drupal 6 but the structure is different: <strong>sites\/default\/settings.php<\/strong><\/p>\r\n<p>You will be able to see some scripting, the one you need is:<\/p>\r\n<pre class=\"brush:php\">\r\n'database' =&gt; '****',\r\n\/\/Database name\r\n\t  \r\n'username' =&gt; '****',\r\n\/\/Database username\r\n\t  \r\n'password' =&gt; '****',\r\n\/\/Database password\r\n\t  \r\n'host' =&gt; 'localhost',\r\n\/\/Database URL\r\n\t  \r\n'port' =&gt; '',\r\n\/\/You can enter database server port here if needed\r\n\r\n'driver' =&gt; 'mysql',\r\n\/\/Your database type\r\n\t  \r\n'prefix' =&gt; '',\r\n\/\/Database Prefix\r\n<\/pre>\r\n<h3>PrestaShop<\/h3>\r\n<p>Open your PrestaShop installation root and locate following file: <strong>\/config\/settings.inc.php<\/strong><\/p>\r\n<p>You will be able to see the following data:<\/p>\r\n<pre class=\"brush:php\">\r\ndefine('__PS_BASE_URI__', '\/link\/prestashop\/');\r\n\/\/Your Prestashop installation folder, your website folder\r\n\r\ndefine('_THEME_NAME_', 'theme068');\r\n\/\/Your theme name\r\n\r\ndefine('_DB_NAME_', '****');\r\n\/\/Your database name\r\n\r\ndefine('_DB_SERVER_', 'localhost');\r\n\/\/Your database URL, regularly it is localhost\r\n\r\ndefine('_DB_USER_', '****');\r\n\/\/Your database user name\r\n\r\ndefine('_DB_PREFIX_', 'ps_');\r\n\/\/Your database prefix\r\n\r\ndefine('_DB_PASSWD_', '****');\r\n\/\/Database password\r\n\r\ndefine('_DB_TYPE_', 'MySQL');\r\n\/\/Database type\r\n\r\ndefine('_COOKIE_KEY_', 'oKxpLkDzaQ8HPcWJz4PnoeA27CEV7b6A33M4gdXfFWNwurb3kcHPh6xM');\r\n\/\/This key is generated automatically\r\n\r\ndefine('_COOKIE_IV_', 'kTq5big3');\r\n\/\/This key is provided automatically\r\n\r\ndefine('_PS_VERSION_', '1.3.2.3');\r\n\/\/Your Prestashop version\r\n<\/pre>\r\n<h3>Magento<\/h3>\r\n<p>Open your Magento installation root and locate following file: <strong>app\/etc\/local.xml<\/strong><\/p>\r\n<p>You will be able to see some scripting, the one you need is:<\/p>\r\n<pre class=\"brush:xml\">\r\n<host><![CDATA[localhost]]><\/host>\r\n\/\/Your database URL, regularly it is localhost\r\n\r\n<username><![CDATA[***]]><\/username>\r\n\/\/Your database user name\r\n\r\n<password><![CDATA[***]]><\/password>\r\n\/\/Database password\r\n\r\n<dbname><![CDATA[***]]><\/dbname>\r\n\/\/Your database name\r\n<\/pre>\r\n<h3>osCommerce<\/h3>\r\n<p>Open your osCommerce installation root and locate following file: <strong>includes\/configure.php<\/strong><\/p>\r\n<p>You will be able to see a lot of scripting, the one you need is:<\/p>\r\n<pre class=\"brush:php\">\r\ndefine('DB_SERVER', 'localhost');\r\n\/\/Your database URL, usually it is localhost\r\n\r\ndefine('DB_SERVER_USERNAME', '****');\r\n\/\/Your database user name\r\n\r\ndefine('DB_SERVER_PASSWORD', '****');\r\n\/\/Database password\r\n\r\ndefine('DB_DATABASE', '****');\r\n\/\/Your database name\r\n\r\ndefine('STORE_SESSIONS', 'mysql');\r\n\/\/Your database type\r\n<\/pre>\r\n<h3>Zen-Cart<\/h3>\r\n<p>Open your Zen-Cart installation root and locate following files (Zen-Cart has 2 configuration files, you need to edit both files): <strong>adminfolder\/includes\/configure.php<\/strong> and <strong>includes\/configure.php<\/strong><\/p>\r\n<p>You will be able to see a lot of scripting, the one you need is:<\/p>\r\n<pre class=\"brush:php\">\r\ndefine('DB_TYPE', 'mysql');\r\n\/\/Your database type\r\n\r\ndefine('DB_PREFIX', '');\r\n\/\/Database prefix\r\n\r\ndefine('DB_CHARSET', 'utf8');\r\n\/\/Database character set\r\n\r\ndefine('DB_SERVER', 'localhost');\r\n\/\/Your database URL, regularly it is localhost\r\n\r\ndefine('DB_SERVER_USERNAME', '****');\r\n\/\/Your database user name\r\n\r\ndefine('DB_SERVER_PASSWORD', '****');\r\n\/\/Database password\r\n\r\ndefine('DB_DATABASE', '****');\r\n\/\/Your database name\r\n<\/pre>\r\n<h3>OpenCart<\/h3>\r\n<p>Open your Opencart installation root and locate following file: <strong>config.php<\/strong><\/p>\r\n<p>You will be able to see a lot of scripting, the one you need is:<\/p>\r\n<pre class=\"brush:php\">\r\n\r\ndefine('DB_DRIVER', 'mysql');\r\n\/\/Your database type\r\n\r\ndefine('DB_HOSTNAME', 'localhost');\r\n\/\/Your database URL, regularly it is localhost\r\n\r\ndefine('DB_USERNAME', '****');\r\n\/\/Your database user name\r\n\r\ndefine('DB_PASSWORD', '****');\r\n\/\/Database password\r\n\r\ndefine('DB_DATABASE', '****');\r\n\/\/Your database name\r\n\r\ndefine('DB_PREFIX', '');\r\n\/\/Database prefix\r\n\r\n<\/pre>\r\n<h3>Virtuemart<\/h3>\r\n<p>Since VirtueMart is Joomla component, configuration file is absolutely the same as in Joomla CMS. Please check the details above.<\/p>\r\n<p>&nbsp;<\/p>\r\n<p><\/p>\r\n<p><\/p>\r\n<p><\/p>\r\n<div class=\"inline-banner\">\r\n<a href=\"https:\/\/www.templatemonster.com\/cart.php?addOffer=587\">\r\n<img decoding=\"async\" src=\"\/help\/files\/banners\/inline\/Banner-1-(500-x100).jpg\" \/>\r\n<\/a>\r\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Sometimes you may need to find out your database details or change it. The best way to do it is to view configuration file in your system. Each CMS\/e-commerce engine has a different filename and path to save this data. In this tutorial you will learn the way to edit\/locate your CMS\/e-commerce configuration files and [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1019],"tags":[588,545,913],"class_list":["post-9623","post","type-post","status-publish","format-standard","hentry","category-hosting-faq","tag-cms","tag-database","tag-ecommerce-2"],"_links":{"self":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/9623","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/comments?post=9623"}],"version-history":[{"count":1,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/9623\/revisions"}],"predecessor-version":[{"id":82862,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/posts\/9623\/revisions\/82862"}],"wp:attachment":[{"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/media?parent=9623"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/categories?post=9623"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.templatemonster.com\/help\/wp-json\/wp\/v2\/tags?post=9623"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}