wp-config.php generator
A complete, clean wp-config.php: database settings, eight fresh keys and salts, the table prefix, and debug and hardening constants for the environment you choose. Built in your browser — your database password never leaves it.
Upload it to the WordPress root as wp-config.php, or one directory above it — WordPress looks there too. Set its permissions so only the web server's user can read it (400 or 440 on most hosts).
What each part does
The file follows WordPress's own wp-config-sample.php, in the same order. The database constants tell WordPress where its tables live; utf8mb4 is the character set every current install uses. The eight keys and salts sign login cookies and nonces — the salt generator explains each pair, and the salts guide covers when to rotate them. $table_prefix must match the tables that already exist if you are reconnecting a site.
The environment preset sets WP_ENVIRONMENT_TYPE, which plugins read to change their behaviour, and the matching debug constants: production keeps WP_DEBUG off; staging logs errors to wp-content/debug.log without showing them; development shows notices on screen and loads unminified core scripts. DISALLOW_FILE_EDIT takes away the dashboard code editors an attacker with an admin session would use first, and FORCE_SSL_ADMIN keeps logins on HTTPS.
Quick answers
Is it safe to type my database password into this page?
The page builds the file with JavaScript in your browser and makes no request with anything you type. Even so, treat the output as a secret: do not paste it into tickets or chat, and keep wp-config.php out of version control.
What if my database password contains a quote or backslash?
The generator escapes both for PHP's single-quoted strings, so a password such as it's\here is written as 'it\'s\\here' and reaches the database exactly as typed.
Should WP_DEBUG ever be on in production?
Not with errors displayed: notices can leak file paths and query details to visitors. If you need to diagnose a live problem, use the staging preset's pattern — WP_DEBUG and WP_DEBUG_LOG on, WP_DEBUG_DISPLAY off — and switch it back afterwards.
Can I move wp-config.php out of the web root?
Yes, one level up. WordPress checks the directory above its own for wp-config.php when the file is not in the root, which keeps it out of reach if PHP processing ever fails and the server would otherwise send it as plain text.