customised wordpress wp-config file

Out of the box, the WordPress wp-config.php file is basic and ugly.

Below is our standard wp-config.php file to provide additional features, security and performance.

<?php
################################
//security of files and folders
################################
define( 'FS_CHMOD_DIR', ( 0755 & ~ umask() ) );
define( 'FS_CHMOD_FILE', ( 0644 & ~ umask() ) );

################################
//increase memory limit (optional)
################################
//define('WP_MEMORY_LIMIT', '1024M');

################################
//disable post revisions (optional)
################################
//define('WP_POST_REVISIONS', false );

################################
//empty trash every 14 days automatically
################################
define( 'EMPTY_TRASH_DAYS', 14 ); // 14 days

################################
//automatically optimise the database
################################
define( 'WP_ALLOW_REPAIR', true );

################################
//change autosave interval
################################
define('AUTOSAVE_INTERVAL', 30 ); // seconds

################################
// MySQL settings
################################
define('DB_NAME', 'DB_NAME');
define('DB_USER', 'DB_USER');
define('DB_PASSWORD', 'DB_PASS');
define('DB_HOST', 'localhost');
define('DB_CHARSET', 'utf8mb4');
define('DB_COLLATE', '');

################################
# Authentication Unique Keys and Salts.
################################
define('AUTH_KEY',         'INSERT_KEY_HERE');
define('SECURE_AUTH_KEY',  'INSERT_KEY_HERE');
define('LOGGED_IN_KEY',    'INSERT_KEY_HERE');
define('NONCE_KEY',        'INSERT_KEY_HERE');
define('AUTH_SALT',        'INSERT_KEY_HERE');
define('SECURE_AUTH_SALT', 'INSERT_KEY_HERE');
define('LOGGED_IN_SALT',   'INSERT_KEY_HERE');
define('NONCE_SALT',       'INSERT_KEY_HERE');

################################
# WordPress Database Table prefix.
################################
$table_prefix  = 'wp_';

################################
# For developers: WordPress debugging mode.
################################
define('WP_DEBUG', false);

/* That's all, stop editing! Happy blogging. */

/** Absolute path to the WordPress directory. */
if ( !defined('ABSPATH') )
	define('ABSPATH', dirname(__FILE__) . '/');

/** Sets up WordPress vars and included files. */
require_once(ABSPATH . 'wp-settings.php');
  • custom wp config, wordpress, config
  • 2 Users Found This Useful
Was this answer helpful?

Related Articles

Fix WordPress 404 Errors on Password Protected Directories

You are reading this article becasue you have applied password protection on the wp-admin...

Enable Fenced Off Debugging to Your IP in Wordpress

Use the code below to activate the bugging in WordPress but locked down to your IP.Put this in...

How to protect your Wordpress Login from Bots

You are reading this article because you are getting a lot of attacks on your WordPress login...

SVG Logo is not appearing in Wordpress

You are reading this article because you have managed to upload an SVG file to your Wordpress...

Import piped separated formatted data from wordpress to google sheets

You are reading this article because you have a list of posts in wordpress and you want to grab...