Files
wordpress/wp-config.php
2026-04-09 03:22:19 +08:00

82 lines
2.0 KiB
PHP

<?php
/**
* Main WordPress configuration file.
*
* HostForge strategy:
* - If running under HostForge, load wp-config-hostforge.php
* - If running locally, allow wp-config-local.php
* - Otherwise fall back to manual defaults
*/
/**
* HostForge platform settings.
*
* We use HOSTFORGE_SITE_ID as the runtime marker that this site
* is being managed by HostForge.
*/
if (
file_exists(__DIR__ . '/wp-config-hostforge.php') &&
(
getenv('HOSTFORGE_SITE_ID') !== false ||
isset($_ENV['HOSTFORGE_SITE_ID'])
)
) {
require_once __DIR__ . '/wp-config-hostforge.php';
/**
* Local configuration information.
*
* Recommended for local development only.
* Make sure this file is gitignored.
*/
} elseif (file_exists(__DIR__ . '/wp-config-local.php')) {
require_once __DIR__ . '/wp-config-local.php';
/**
* Fallback configuration.
*
* Used only when not running under HostForge and no local config exists.
*/
} else {
define('DB_NAME', 'database_name');
define('DB_USER', 'database_username');
define('DB_PASSWORD', 'database_password');
define('DB_HOST', '127.0.0.1');
define('DB_CHARSET', 'utf8mb4');
define('DB_COLLATE', '');
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');
}
/**
* WordPress database table prefix.
*/
$table_prefix = 'wp_';
/**
* Debug mode.
*
* Default false unless already defined by platform/local config.
*/
if (!defined('WP_DEBUG')) {
define('WP_DEBUG', false);
}
/**
* Absolute path to the WordPress directory.
*/
if (!defined('ABSPATH')) {
define('ABSPATH', __DIR__ . '/');
}
/**
* Sets up WordPress vars and included files.
*/
require_once ABSPATH . 'wp-settings.php';