wp-config.php Generator
The file everyone copies from the last project. Pick an environment and it writes the debug, cache and security constants that suit it — and warns about the ones that do not.
Environment
11 constants set
WP_ENVIRONMENT_TYPE is production, so wp_get_environment_type() reports it and plugins can behave accordingly. Debug output is kept off the page. Database credentials are written into the file.
Constants
11 of 20
Debugging
WP_DEBUG
The master switch. On means PHP notices are raised, and every deprecation is reported.
WP_DEBUG_LOG
Writes to wp-content/debug.log instead of the screen. The pair you want on a live site if you must debug at all.
WP_DEBUG_DISPLAY
Prints errors into the page. Leaks paths and query fragments to visitors.
SCRIPT_DEBUG
Loads unminified core CSS and JS. Only useful while working on core or a block.
SAVEQUERIES
Records every query for inspection. Expensive — memory grows with the page.
Content and updates
DISALLOW_FILE_EDIT
Removes the plugin and theme file editors from the admin. Currently: true.
DISALLOW_FILE_MODS
Blocks all installs and updates from the admin — for sites deployed from git. Currently: true.
WP_AUTO_UPDATE_CORE
minor for security releases only, true for everything, false for none. Currently: minor.
AUTOSAVE_INTERVAL
Seconds between editor autosaves. 60 is core's default.
WP_POST_REVISIONS
How many revisions to keep. A number, or false to keep none. Currently: 5.
EMPTY_TRASH_DAYS
How long trashed content survives before permanent deletion. Currently: 14.
Performance and cron
WP_CACHE
Tells a drop-in object or page cache to engage. Harmless without one. Currently: true.
DISABLE_WP_CRON
Stops cron running on page loads. Pair it with a real crontab or nothing runs. Currently: true.
WP_CRON_LOCK_TIMEOUT
Seconds before a stuck cron run is considered abandoned. Currently: 300.
CONCATENATE_SCRIPTS
Combines admin scripts. Off helps when debugging admin JS.
Security and URLs
FORCE_SSL_ADMIN
Forces https for logins and the admin. Currently: true.
WP_SITEURL
Hard-codes the site URL, so a database from another environment cannot redirect you away.
WP_HOME
Hard-codes the home URL alongside WP_SITEURL.
WP_MEMORY_LIMIT
PHP memory for the front end. Currently: 256M.
WP_MAX_MEMORY_LIMIT
A higher ceiling for admin tasks like image resizing. Currently: 512M.
Salts
8 of 8 generated
Generated in your browser from crypto.getRandomValues — nothing is sent anywhere. Changing them logs every user out, which is the point after a compromise.
Keep this file out of version control, or switch to environment variables.
<?php // Generated with WP CodeKit — powered by GrowQuest (https://growquest.io). /** * WordPress configuration — production. * * Everything must be defined before the require at the bottom. */ // ** Database ** // define( 'DB_NAME', 'acme_wp' ); define( 'DB_USER', 'acme_wp' ); define( 'DB_PASSWORD', '' ); define( 'DB_HOST', 'localhost' ); define( 'DB_CHARSET', 'utf8mb4' ); define( 'DB_COLLATE', '' ); $table_prefix = 'wp_'; // ** Environment ** // define( 'WP_ENVIRONMENT_TYPE', 'production' ); // ** Content and updates ** // define( 'DISALLOW_FILE_EDIT', true ); define( 'DISALLOW_FILE_MODS', true ); define( 'WP_AUTO_UPDATE_CORE', 'minor' ); define( 'WP_POST_REVISIONS', 5 ); define( 'EMPTY_TRASH_DAYS', 14 ); // ** Performance and cron ** // define( 'WP_CACHE', true ); define( 'DISABLE_WP_CRON', true ); define( 'WP_CRON_LOCK_TIMEOUT', 300 ); // ** Security and URLs ** // define( 'FORCE_SSL_ADMIN', true ); define( 'WP_MEMORY_LIMIT', '256M' ); define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // ** Authentication salts — unique to this site ** // define( 'AUTH_KEY', ';g?EqFiPL)2+W6ycA3TAlA#f]Ry_Q_hu&nKDT2?)suUpQF.MA|RzL+CCtLb38GqS' ); define( 'SECURE_AUTH_KEY', 'r-<a$jW|G.D8aG6jP3n,nyEaz_0(w<KJ3Y!1`x4|5b^40%W9m/TWg5yLT;WR.<+k' ); define( 'LOGGED_IN_KEY', '(EcP**OmfM88lOXSHiHW4TWiEf*43#b`,e`)ja|HhNOlk3!Dns.+x?FY_43:UO}S' ); define( 'NONCE_KEY', 'v^Hh~jy8CwCM|l}[UH1VaHvC8@RQdt)pU>a1m|k]VbnT?b~~0az<tGfjcN%G1LDG' ); define( 'AUTH_SALT', 'b=wMu2qXGXm0$0eKuHD@Tmy-7C@{(*v$E?.i5yz;i8M:)?)2]`NJ^p*n5jUIdH$6' ); define( 'SECURE_AUTH_SALT', '4*{zI%VlitB$GW`g]{+7l=|TY%~L<(OU>6B>w{%RPVm{T}?D^pxJP?vG)n&|?fjk' ); define( 'LOGGED_IN_SALT', 'F62zC9({WcAOtUH=c:cD9Yk)dEe~@,q,L`Hp:97`1LAzsB5JB{p{xAb$6S@^]Q!`' ); define( 'NONCE_SALT', '>p]`wjmAdYBrB#M|vl!8NSmVN0WB))2Y/XOCFqCizj<V8fcm}<ugXzp,AEG^mW&?' ); // ** Absolute path and bootstrap ** // if ( ! defined( 'ABSPATH' ) ) { define( 'ABSPATH', __DIR__ . '/' ); } require_once ABSPATH . 'wp-settings.php';