Config.php Jun 2026
Moving an application from a local development server (XAMPP) to a staging server (a VPS) to a production cluster (AWS) requires changing environment-specific values. A single config.php (or an environment-aware version of it) makes this trivial.
✅ Is the file located the web root? ✅ Does it not output anything (no echo , no HTML)? ✅ Are production passwords and keys not hardcoded (using env vars instead)? ✅ Is display_errors set to 0 in production? ✅ Is there a .gitignore entry for the real config, but a tracked config.example.php ? ✅ Does every page that needs config load it via require_once ? config.php
// Set timezone date_default_timezone_set($config['site']['timezone']); ?> Moving an application from a local development server
// Now use the settings $db = new mysqli( $config['db']['host'], $config['db']['user'], $config['db']['pass'], $config['db']['name'] ); ✅ Does it not output anything (no echo , no HTML)