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' ); Use code with caution.
WordPress uses eight distinct keys. By default, they contain dummy text ("put your unique phrase here"), which you must replace:
Add this crontab-friendly line to auto-repair tables:
/** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf8mb4');
Rename wp-config-sample.php (provided with WordPress) to wp-config.php , then edit it with your actual database credentials. wp config.php
Remember these three golden rules:
Because a single missing semicolon or syntax error in wp-config.php can take your entire site offline, follow these safety steps when making edits:
Diary: read at your own risk. No refunds.
A completely blank white screen with no error message (the “White Screen of Death”) is typically caused by a PHP fatal error. Since error display is often disabled on production servers, you see nothing instead of an error message. define( 'AUTH_KEY', 'put your unique phrase here' );
/* That's all, stop editing! Happy publishing. */
By default, wp-config.php is stored in public_html , making it potentially accessible via a web browser if your server is misconfigured. A simple but highly effective security measure is to move it – for example, out of public_html or html .
Do not, under any circumstances, remove secret keys.
The integrity of the wp-config.php file is directly tied to your site's ability to operate. If this file is missing or corrupted, WordPress cannot connect to its database, and your site will go offline. Consequently, understanding this file is not just for developers; it is essential for any website owner aiming to maintain a high-performing and secure WordPress site. A completely blank white screen with no error
define( 'WP_ALLOW_MULTISITE', true );
Because wp-config.php holds the literal keys to your website, protecting it from malicious actors is paramount.
Before you change anything, memorize these three rules: