Skip to content

Instantly share code, notes, and snippets.

@irazasyed
Created October 17, 2013 21:50
Show Gist options
  • Save irazasyed/7032857 to your computer and use it in GitHub Desktop.
Save irazasyed/7032857 to your computer and use it in GitHub Desktop.
WP: wp-config.php helpful configs/details.
<?php
//Change Database Prefix
$table_prefix = 'secure_';
//Change Security Keys- https://api.wordpress.org/secret-key/1.1/salt/
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');
//Disable Theme File Editor
define('DISALLOW_FILE_EDIT', true);
//Disallow Users to Install Plugins/Themes or doing updates
define('DISALLOW_FILE_MODS',true);
//Forcing use of FTP for all uploads, upgrades and plugin installation
define('FS_METHOD', 'ftpext');
//If FTPS is supported then add the following line to the config file
define('FTP_SSL', true);
//If your webhost or server supports SFTP you should use the following more secure option instead
define('FS_METHOD', 'ssh2');
// Limit the number of saved revisions
define('WP_POST_REVISIONS', 3);
// Disable the post-revisioning feature
define('WP_POST_REVISIONS', false);
//Foce SSL on Admin Panel
define('FORCE_SSL_LOGIN', true);
define('FORCE_SSL_ADMIN', true);
//Change the Autosave Interval
define('AUTOSAVE_INTERVAL', 240 );
//Automated Trash
define('EMPTY_TRASH_DAYS', 7);
//Disabling Trash Feature
define('EMPTY_TRASH_DAYS', 0);
//Automatic Database Repair - http://example.com/wp-admin/maint/repair.php
define('WP_ALLOW_REPAIR', true);
//Enable Wp_debug while developing
define('WP_DEBUG',true);
//Block External Requests
define('WP_HTTP_BLOCK_EXTERNAL', true);
//Grant Access to particular Site
define('WP_ACCESSIBLE_HOSTS', 'rpc.pingomatic.com');
//Increase PHP Memory
define('WP_MEMORY_LIMIT', '64M');
define('WP_MEMORY_LIMIT', '96M');
define('WP_MEMORY_LIMIT', '128M');
//Error Log Configuration - Create a file called php_error.log
@ini_set('log_errors','On');
@ini_set('display_errors','Off');
@ini_set('error_log','/home/path/domain/logs/php_error.log');
//Enabling and Disabling the Cache
define('WP_CACHE', true);
define('WP_CACHE', false);
define('ENABLE_CACHE', true);
define('DISABLE_CACHE', true);
define('CACHE_EXPIRATION_TIME', 3600);
?>
//Protect wp-config File - (Use .htaccess file)
<Files wp-config.php>
Order Allow,Deny
Deny from all
</Files>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment