wp-config-sample.php 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. define( 'WP_CONTENT_URL', 'http://' . $_SERVER['HTTP_HOST'] . '/wp/app' );
  27. define( 'PLUGINDIR', dirname(__FILE__) . '/app/plugins' );
  28. //define ( 'WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/' );
  29. //define ( 'WP_SITEURL', 'https://' . $_SERVER['HTTP_HOST'] . '/wp' );
  30. //define( 'WP_ALLOW_MULTISITE', true );
  31. //define( 'DISALLOW_FILE_EDIT', true );
  32. //define(‘FORCE_SSL_ADMIN’, true);
  33. //define(‘FORCE_SSL_LOGIN’, true);
  34. //define('WP_HTTP_BLOCK_EXTERNAL', true);
  35. //define('DISALLOW_FILE_EDIT',true);
  36. //define('DISALLOW_FILE_MODS', true);
  37. define('WP_DEBUG', getenv('WP_DEBUG'));
  38. define( 'WP_DEBUG_DISPLAY', true );
  39. define( 'SAVEQUERIES', true );
  40. define( 'SCRIPT_DEBUG', true );
  41. define( 'WP_CACHE', false );
  42. @ini_set( 'log_errors', 'On' );
  43. @ini_set( 'display_errors', 'On' );
  44. @ini_set( 'error_log', '/php_error.log' );
  45. @ini_set( 'error_reporting', E_ALL );
  46. if (ENVIRONMENT === ENVIRONMENT_PROD) {
  47. error_reporting(0);
  48. @ini_set('display_errors', 0);
  49. }
  50. define('AUTOSAVE_INTERVAL', 720 );
  51. define('WP_POST_REVISIONS', 2);
  52. define('WP_MEMORY_LIMIT', '128M');
  53. //if ( file_exists( dirname( __FILE__ ) . '/memcached.php' ) )
  54. // $memcached_servers = include( dirname( __FILE__ ) . '/memcached.php' );
  55. if ( !defined('ABSPATH') )
  56. define('ABSPATH', dirname(__FILE__) . '/wp/');
  57. require_once(ABSPATH . 'wp-settings.php');
  58. ?>