Created
October 8, 2013 15:53
-
-
Save gabrielstuff/6886914 to your computer and use it in GitHub Desktop.
A basic wp-config file for playing with appfog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once(ABSPATH . 'auth.php'); | |
| $services = getenv("VCAP_SERVICES"); | |
| if($services != ""){ | |
| $services_json = json_decode($services,true); | |
| $mysql_config = $services_json["mysql-5.1"][0]["credentials"]; | |
| // ** MySQL settings from resource descriptor ** // | |
| define('DB_NAME', $mysql_config["name"]); | |
| define('DB_USER', $mysql_config["user"]); | |
| define('DB_PASSWORD', $mysql_config["password"]); | |
| define('DB_HOST', $mysql_config["hostname"]); | |
| define('DB_PORT', $mysql_config["port"]); | |
| } else { | |
| define('DB_NAME', $auth_db_name); | |
| define('DB_USER', $auth_db_user); | |
| define('DB_PASSWORD', $auth_db_password); | |
| define('DB_HOST', $auth_hostname); | |
| define('DB_PORT', $auth_port); | |
| } | |
| define('DB_CHARSET', 'utf8'); | |
| define('DB_COLLATE', ''); | |
| define ('WPLANG', ''); | |
| define('WP_DEBUG', false); | |
| require('wp-salt.php'); | |
| $table_prefix = 'wp_'; | |
| /* That's all, stop editing! Happy blogging. */ | |
| /** Absolute path to the WordPress directory. */ | |
| if ( !defined('ABSPATH') ) | |
| define('ABSPATH', dirname(__FILE__) . '/'); | |
| /** Sets up WordPress vars and included files. */ | |
| require_once(ABSPATH . 'wp-settings.php'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment