Skip to content
Accessibility
Theme
Text size
High contrast
Limit animations
Readable fontAtkinson Hyperlegible
Increased text spacing
Underline links
Always show focus

Runs in your browser — nothing you paste is uploaded.

wp-config.php Generator

Build a complete wp-config.php — database settings, a fresh set of security salts, and the debug and hardening constants most sites want. Salts are generated with the Web Crypto API; nothing you type leaves your browser.


    

What this generates

A ready-to-save wp-config.php containing your database connection details, the $table_prefix, eight cryptographically-random authentication keys and salts, and whichever debug and hardening constants you tick. Drop it in your WordPress root, or copy the relevant lines into an existing file.

The options explained

WP_DEBUG

Turns on WordPress debugging but writes messages to wp-content/debug.log instead of showing them to visitors (WP_DEBUG_LOG on, WP_DEBUG_DISPLAY off) — the safe way to debug a live site.

Force SSL for the admin

FORCE_SSL_ADMIN makes wp-admin and login always use HTTPS. Enable it once your certificate is in place.

Disable the file editor

DISALLOW_FILE_EDIT removes the in-dashboard theme/plugin code editor — a common hardening step, so a stolen admin session can't edit PHP. On by default here.

Site URL

Setting WP_HOME and WP_SITEURL in the config pins the address and skips a database lookup. Useful when moving between environments.

About the salts

The eight keys and salts are generated locally with crypto.getRandomValues. Click New salts for a fresh set. Need only the salts for an existing config? Use the dedicated WordPress Salts tool. Locked out of an account? The WordPress Password Hash tool resets a password by SQL.

Frequently asked questions

Where does wp-config.php go?

In the WordPress root directory (the folder containing wp-load.php), one level above wp-content. WordPress also checks one directory above the root, which is a common way to keep it outside the web root.

Are the salts safe — they're generated on a web page?

Yes. They're produced locally with the browser's crypto.getRandomValues and never leave your machine. Click New salts for a fresh set; changing salts on an existing site simply logs everyone out.

Related tools