wp-config-sample.php 2.3 KB

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