wp-config-sample.php 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php
  2. require_once(__DIR__.'/vendor/autoload.php');
  3. $dotenv = Dotenv\Dotenv::createImmutable(__DIR__);
  4. $dotenv->load();
  5. define('ENVIRONMENT_DEV', 'dev');
  6. define('ENVIRONMENT_STAGE', 'stage');
  7. define('ENVIRONMENT_PROD', 'prod');
  8. define('ENVIRONMENT', getenv('ENVIRONMENT'));
  9. define('DB_NAME', getenv('DB_NAME'));
  10. define('DB_USER', getenv('DB_USER'));
  11. define('DB_PASSWORD', getenv('DB_PASSWORD'));
  12. define('DB_HOST', getenv('DB_HOST'));
  13. define('DB_CHARSET', 'utf8');
  14. define('DB_COLLATE', '');
  15. define('AUTH_KEY', getenv('AUTH_KEY'));
  16. define('SECURE_AUTH_KEY', getenv('SECURE_AUTH_KEY'));
  17. define('LOGGED_IN_KEY', getenv('LOGGED_IN_KEY'));
  18. define('NONCE_KEY', getenv('NONCE_KEY'));
  19. define('AUTH_SALT', getenv('AUTH_SALT'));
  20. define('SECURE_AUTH_SALT', getenv('SECURE_AUTH_SALT'));
  21. define('LOGGED_IN_SALT', getenv('LOGGED_IN_SALT'));
  22. define('NONCE_SALT', getenv('NONCE_SALT'));
  23. $table_prefix = getenv('TABLE_PREFIX');
  24. define( 'WPLANG', '' );
  25. define( 'WP_CONTENT_DIR', dirname( __FILE__ ) . '/app' );
  26. // *********** $_SERVER['HTTP_HOST'] will cause warnings with wp-cli ************** //
  27. define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp/app' );
  28. define( 'PLUGINDIR', dirname(__FILE__) . '/app/plugins' );
  29. //define ( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
  30. //define ( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/wp' );
  31. //define( 'WP_ALLOW_MULTISITE', true );
  32. //define( 'DISALLOW_FILE_EDIT', true );
  33. //define(‘FORCE_SSL_ADMIN’, true);
  34. //define(‘FORCE_SSL_LOGIN’, true);
  35. //define('WP_HTTP_BLOCK_EXTERNAL', true);
  36. //define('DISALLOW_FILE_EDIT',true);
  37. //define('DISALLOW_FILE_MODS', true);
  38. define('WP_DEBUG', getenv('WP_DEBUG'));
  39. define( 'WP_DEBUG_DISPLAY', true );
  40. define( 'SAVEQUERIES', true );
  41. define( 'SCRIPT_DEBUG', true );
  42. define( 'WP_CACHE', false );
  43. @ini_set( 'log_errors', 'On' );
  44. @ini_set( 'display_errors', 'On' );
  45. @ini_set( 'error_log', '/php_error.log' );
  46. @ini_set( 'error_reporting', E_ALL );
  47. if (ENVIRONMENT === ENVIRONMENT_PROD) {
  48. error_reporting(0);
  49. @ini_set('display_errors', 0);
  50. }
  51. define('AUTOSAVE_INTERVAL', 720 );
  52. define('WP_POST_REVISIONS', 2);
  53. define('WP_MEMORY_LIMIT', '128M');
  54. //if ( file_exists( dirname( __FILE__ ) . '/memcached.php' ) )
  55. // $memcached_servers = include( dirname( __FILE__ ) . '/memcached.php' );
  56. //define('GLOBAL_SMTP_DISABLE',true);
  57. //define('GLOBAL_SMTP_DEBUG',true);
  58. //define('GLOBAL_SMTP_HOST','smtp.gmail.com');
  59. //define('GLOBAL_SMTP_PORT',465);
  60. //define('GLOBAL_SMTP_USER','USER@DOMAIN.COM');
  61. //define('GLOBAL_SMTP_PASSWORD','PASSWORD');
  62. //define('GLOBAL_SMTP_FROM_NAME','');
  63. //define('GLOBAL_SMTP_FROM','');
  64. //define('GLOBAL_SMTP_SECURE;','ssl');
  65. //define('GLOBAL_SMTP_RETURN_PATH','');
  66. //define('GLOBAL_SMTP_REPLYTO_FROM','');
  67. //define('GLOBAL_SMTP_REPLYTO_FROM_NAME','');
  68. if ( !defined('ABSPATH') )
  69. define('ABSPATH', dirname(__FILE__) . '/wp/');
  70. require_once(ABSPATH . 'wp-settings.php');
  71. ?>