tools/wp-config-generator
wp-config.php Generator
Build a complete wp-config.php: database credentials, eight freshly generated secret keys, debugging, file permissions, revisions, cron and update policy — every constant placed above the wp-settings.php require, which is the only place they have any effect.
wp-config.php
<?php
/**
* The base configuration for WordPress.
*
* Every constant below is defined before the wp-settings.php require at the
* bottom, which is where WordPress boots. A constant defined after that line
* has no effect at all — core has already applied its own default, so the
* second define() only raises "Constant X already defined".
*
* @link https://developer.wordpress.org/advanced-administration/wordpress/wp-config/
*/
/** Database settings — these come from your host. */
define( 'DB_NAME', 'database_name_here' );
define( 'DB_USER', 'username_here' );
define( 'DB_PASSWORD', 'password_here' );
define( 'DB_HOST', 'localhost' );
define( 'DB_CHARSET', 'utf8mb4' );
define( 'DB_COLLATE', '' );
/**#@+
* Authentication unique keys and salts.
*
* Generated in your browser with crypto.getRandomValues(), 64 characters each.
* Changing any of them invalidates every existing cookie, which logs everyone
* out — that is the recovery procedure after a leak, not a routine edit.
*
* @since 2.6.0
*/
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' );
/**#@-*/
/**
* WordPress database table prefix.
*
* A variable rather than a constant: wpdb reads $table_prefix by name, and a
* config that defines a constant instead falls back to 'wp_' without saying so.
*/
$table_prefix = 'wp_';
/** Debugging. */
define( 'WP_DEBUG', false );
define( 'WP_ENVIRONMENT_TYPE', 'production' );
/** File permissions and limits. */
define( 'DISALLOW_FILE_EDIT', true );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';