File: /var/www/vhosts/trinityhouseharrogate.co.uk/httpdocs/wp-content/uploads/wp-config.txt
<?php
/**
* wp-config.php
* Local and production environments
*
* @link https://codex.wordpress.org/Editing_wp-config.php
*
* @package WordPress
*/
// Set your environment/url pairs
$environments = array(
'local' => 'trinityhouseharrogate.local',
'production' => 'trinityhouseharrogate.co.uk'
);
// Get the hostname
$http_host = $_SERVER['HTTP_HOST'];
// Loop through $environments to see if there’s a match
foreach($environments as $environment => $hostname) {
if (stripos($http_host, $hostname) !== FALSE) {
define('ENVIRONMENT', $environment);
break;
}
}
// Exit if ENVIRONMENT is undefined
if (!defined('ENVIRONMENT')) exit('Error - no database configured for this host');
// Location of environment-specific configuration
$wp_db_config = 'wp-config-' . ENVIRONMENT . '.php';
// Check to see if the configuration file for the environment exists
if (file_exists(__DIR__ . '/' . $wp_db_config)) {
require_once($wp_db_config);
} else {
// Exit if configuration file does not exist
exit('Error - No database configuration found for this host');
}
// That’s all, stop editing!
// Absolute path to the WordPress directory
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');
// Post revisions
define('AUTOSAVE_INTERVAL', 300);
define('WP_POST_REVISIONS', 1);
// Rename wp-content
define('WP_CONTENT_FOLDERNAME', 'app');
define('WP_CONTENT_DIR', ABSPATH . WP_CONTENT_FOLDERNAME);
define('WP_CONTENT_URL', WP_SITEURL . WP_CONTENT_FOLDERNAME);
// Sets up WordPress vars and included files
require_once(ABSPATH . 'wp-settings.php');