SHARE
TWEET

wp config

a guest Dec 24th, 2015 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /* -------------------------------------------- *
  3. **  Determine the custom variables.            **
  4. * -------------------------------------------- */
  5. $custom_ABS_DOCROOT = rtrim($_SERVER['DOCUMENT_ROOT'], '/');
  6. $custom_ABS_WPROOT = (strpos(dirname(__FILE__),'wp-admin') === false) ? dirname(__FILE__) : strstr(dirname(__FILE__), '/wp-admin');
  7. $custom_URL_PATH = substr($custom_ABS_WPROOT, strlen($custom_ABS_DOCROOT));
  8. $custom_URL_DOMAIN = (!empty($_SERVER['HTTP_HOST'])) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];
  9. $custom_URL_SSL = 'http' . ((isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!='off') ? 's' : '') . '://';
  10. $custom_WP_HOME = $custom_WP_SITEURL = $custom_URL_SSL . $custom_URL_DOMAIN . ((!empty($custom_URL_PATH)) ? $custom_URL_PATH : '');
  11. $custom_WP_TEMP_DIR = sys_get_temp_dir();
  12. $custom_FS_CHMOD_VAR = (substr($_SERVER['SERVER_SOFTWARE'],0,5)=='nginx') ? 20 : 0;
  13. $custom_FS_CHMOD_DIR = (0755+$custom_FS_CHMOD_VAR &~ umask());
  14. $custom_FS_CHMOD_FILE = (0644+$custom_FS_CHMOD_VAR &~ umask());
  15. $custom_FTP_BASE = $custom_ABS_WPROOT;
  16. $custom_FTP_HOST = $_SERVER['SERVER_ADDR'];
  17.  
  18. /* -------------------------------------------- *
  19. **  Enable Force to HTTPS/SSL                  **
  20. * -------------------------------------------- *
  21. if (!isset($_SERVER['HTTPS']) || $_SERVER['HTTPS'] !== 'on') {
  22.     if(!headers_sent()) {
  23.         header("Status: 301 Moved Permanently");
  24.         header(sprintf(
  25.             'Location: %s',
  26.             $custom_WP_SITEURL
  27.         ));
  28.         exit();
  29.     }
  30. }
  31.  
  32.  
  33. /* -------------------------------------------- *
  34. **  Address settings.                          **
  35. * -------------------------------------------- */
  36. define('WP_HOME', $custom_WP_HOME);
  37. define('WP_SITEURL', $custom_WP_SITEURL);
  38. define('WP_TEMP_DIR', $custom_WP_TEMP_DIR);
  39.  
  40.  
  41. /* -------------------------------------------- *
  42. **  Filesystem settings.                       **
  43. * -------------------------------------------- */
  44. define('FS_METHOD', 'direct');
  45. define('FS_CHMOD_DIR', $custom_FS_CHMOD_DIR);
  46. define('FS_CHMOD_FILE', $custom_FS_CHMOD_FILE);
  47.  
  48.  
  49. /* -------------------------------------------- *
  50. **  FTP settings.                              **
  51. * -------------------------------------------- */
  52. define('FTP_BASE', $custom_FTP_BASE);
  53. define('FTP_HOST', $custom_FTP_HOST);
  54. define('FTP_USER', 'username');
  55. define('FTP_PASS', 'password');
  56.  
  57.  
  58. /* -------------------------------------------- *
  59. **  MySQL settings.                            **
  60. * -------------------------------------------- */
  61. define('DB_NAME', 'database');
  62. define('DB_USER', 'username');
  63. define('DB_PASSWORD', 'password');
  64. define('DB_HOST', 'localhost');
  65. define('DB_CHARSET', 'utf8');
  66. $table_prefix = 'prefix_';
  67.  
  68.  
  69. /* -------------------------------------------- *
  70. **  Debug settings.                            **
  71. * -------------------------------------------- */
  72. define('WP_DEBUG', false);
  73. define('WP_DEBUG_LOG', false);
  74. define('WP_DEBUG_DISPLAY', false);
  75. define('SCRIPT_DEBUG', false);
  76. define('SAVEQUERIES', false);
  77.  
  78.  
  79. /* -------------------------------------------- *
  80. **  Cache settings.                            **
  81. * -------------------------------------------- */
  82. define('WP_CACHE', false);
  83. define('COMPRESS_CSS', false);
  84. define('COMPRESS_SCRIPTS', false);
  85. define('CONCATENATE_SCRIPTS', false);
  86. define('ENFORCE_GZIP', false);
  87.  
  88.  
  89. /* -------------------------------------------- *
  90. **  WordPress Localized Language.              **
  91. * -------------------------------------------- */
  92. define('WPLANG', '');
  93.  
  94.  
  95. /* -------------------------------------------- *
  96. **  Authentication Unique Keys and Salts.      **
  97. * -------------------------------------------- */
  98. keys ==>> https://api.wordpress.org/secret-key/1.1/salt/
  99.  
  100.  
  101. /* -------------------------------------------- *
  102. **  That's all, stop editing! Happy blogging.  **
  103. * -------------------------------------------- */
  104. if ( !defined('ABSPATH') )
  105.     define('ABSPATH', dirname(__FILE__) . '/');
  106. require_once(ABSPATH . 'wp-settings.php');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top