How to print out the Database connection string for any Website Pro website

Have more questions? Submit a request

NOTE: The database connection to remote servers is not allowed by the Website Pro services. In some cases where you require the details please follow the below steps:

  1. Connect to the website FTP service to be able to upload the printout file
  2. Once you are connected to the File system, upload the PHP database printout file
  3. Use the code below with the PHP file uploaded
<?php

echo "Database Host: " . DB_HOST . "</br>";

echo "Database Name: " . DB_NAME . "</br>";

echo "Database User: " . DB_USER . "</br>";

echo "Database Password: " . DB_PASSWORD . "</br>"; ?>

4. Execute the file using the domain or the temporary domain on the site

    • Example: http://websiteurl.com/filename.php

The output on the page executed would have all the necessary details for the database connection.

 

Articles in this section

Was this article helpful?
1 out of 1 found this helpful
Share