WP Config file cheatsheet
Take advantage of your wp-config file to make your WordPress better.
Disable wp core auto updates
1
define( 'WP_AUTO_UPDATE_CORE', false );
Output debug errors to debug.log
Outputs errors to /wp-content/debug.log without displaying them to visitors.
1
2
3
4
5
6
ini_set('log_errors','On');
ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
Increase memory limit
1
define( 'WP_MEMORY_LIMIT', '256M' );
Define site URL
1
2
define( 'WP_HOME', 'http://example.com' );
define( 'WP_SITEURL', 'http://example.com' );
Limit post revisions
1
define('WP_POST_REVISIONS', 3);
Disable post revisions
1
define('WP_POST_REVISIONS', false);
Increase upload limit
1
2
3
@ini_set( 'upload_max_size' , '12M' );
@ini_set( 'post_max_size', '13M');
@ini_set( 'memory_limit', '15M' );
Disable file editing in wp-admin
1
define( 'DISALLOW_FILE_EDIT', true );
This post is licensed under CC BY 4.0 by the author.