/config/public/wp-config.php

https://bitbucket.org/alexhora/wordpress-on-heroku · PHP · 121 lines · 29 code · 22 blank · 70 comment · 7 complexity · 0f5b300765ecb96ab049d20bec35cb7a MD5 · raw file

  1. <?php
  2. /**
  3. * The base configurations of the WordPress.
  4. *
  5. * This file has the following configurations: MySQL settings, Table Prefix,
  6. * Secret Keys, WordPress Language, and ABSPATH. You can find more information
  7. * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
  8. * wp-config.php} Codex page. You can get the MySQL settings from your web host.
  9. *
  10. * This file is used by the wp-config.php creation script during the
  11. * installation. You don't have to use the web site, you can just copy this file
  12. * to "wp-config.php" and fill in the values.
  13. *
  14. * @package WordPress
  15. */
  16. $url = parse_url(getenv("CLEARDB_DATABASE_URL"));
  17. // ** MySQL settings - You can get this info from your web host ** //
  18. /** The name of the database for WordPress */
  19. define("DB_NAME", trim($url["path"], "/"));
  20. // define("DB_NAME", "heroku_4eed1f5663e035f");
  21. /** MySQL database username */
  22. define("DB_USER", trim($url["user"]));
  23. // define("DB_USER", "b7cfc877a785ae");
  24. /** MySQL database password */
  25. define("DB_PASSWORD", trim($url["pass"]));
  26. // define("DB_PASSWORD", "db3717c2");
  27. /** MySQL hostname */
  28. define("DB_HOST", trim($url["host"]));
  29. // define("DB_HOST", "us-cdbr-east-03.cleardb.com");
  30. /** MySQL database port */
  31. // define("DB_PORT", trim($url["port"]));
  32. /** Database Charset to use in creating database tables. */
  33. define("DB_CHARSET", "utf8");
  34. /** Allows both foobar.com and foobar.herokuapp.com to load media assets correctly. */
  35. define("WP_SITEURL", "http://" . $_SERVER["HTTP_HOST"]);
  36. /** WP_HOME is your Blog Address (URL). */
  37. // define('WP_HOME', "http://" . $_SERVER["HTTP_HOST"]);
  38. define("FORCE_SSL_LOGIN", getenv("FORCE_SSL_LOGIN") == "true");
  39. define("FORCE_SSL_ADMIN", getenv("FORCE_SSL_ADMIN") == "true");
  40. if ($_SERVER["HTTP_X_FORWARDED_PROTO"] == "https")
  41. $_SERVER["HTTPS"] = "on";
  42. /** The Database Collate type. Don't change this if in doubt. */
  43. define("DB_COLLATE", "");
  44. /**#@+
  45. * Authentication Unique Keys and Salts.
  46. *
  47. * Change these to different unique phrases!
  48. * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
  49. * You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
  50. *
  51. * @since 2.6.0
  52. */
  53. define("AUTH_KEY", "put your unique phrase here");
  54. define("SECURE_AUTH_KEY", "put your unique phrase here");
  55. define("LOGGED_IN_KEY", "put your unique phrase here");
  56. define("NONCE_KEY", "put your unique phrase here");
  57. define("AUTH_SALT", "put your unique phrase here");
  58. define("SECURE_AUTH_SALT", "put your unique phrase here");
  59. define("LOGGED_IN_SALT", "put your unique phrase here");
  60. define("NONCE_SALT", "put your unique phrase here");
  61. /**#@-*/
  62. /**
  63. * WordPress Database Table prefix.
  64. *
  65. * You can have multiple installations in one database if you give each a unique
  66. * prefix. Only numbers, letters, and underscores please!
  67. */
  68. $table_prefix = "wp_";
  69. /**
  70. * WordPress Localized Language, defaults to English.
  71. *
  72. * Change this to localize WordPress. A corresponding MO file for the chosen
  73. * language must be installed to wp-content/languages. For example, install
  74. * de_DE.mo to wp-content/languages and set WPLANG to "de_DE" to enable German
  75. * language support.
  76. */
  77. define("WPLANG", "");
  78. /**
  79. * For developers: WordPress debugging mode.
  80. *
  81. * Change this to true to enable the display of notices during development.
  82. * It is strongly recommended that plugin and theme developers use WP_DEBUG
  83. * in their development environments.
  84. */
  85. define("WP_DEBUG", false);
  86. /**
  87. * Enable the WordPress Object Cache
  88. */
  89. define("WP_CACHE", getenv("WP_CACHE") == "true");
  90. /**
  91. * Disable the built-in cron job
  92. */
  93. define("DISABLE_WP_CRON", getenv("DISABLE_WP_CRON") == "true");
  94. /* That"s all, stop editing! Happy blogging. */
  95. /** Absolute path to the WordPress directory. */
  96. if ( !defined("ABSPATH") )
  97. define("ABSPATH", dirname(__FILE__) . "/");
  98. /** Sets up WordPress vars and included files. */
  99. require_once(ABSPATH . "wp-settings.php");