Last active
August 23, 2022 06:59
-
-
Save ovizii/6140242 to your computer and use it in GitHub Desktop.
wp-config.php pimping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //disable auto updating of WP since 3.7 | |
| //Disables all core updates: | |
| define( 'WP_AUTO_UPDATE_CORE', false ); | |
| //Enables all core updates, including minor and major: | |
| define( 'WP_AUTO_UPDATE_CORE', true ); | |
| //Enables core updates for minor releases (default): | |
| define( 'WP_AUTO_UPDATE_CORE', 'minor' ); | |
| //only disable updating of the wp.content folder, i.e. no themes and default plugins like akismet and hello dolly | |
| define( 'CORE_UPGRADE_SKIP_NEW_BUNDLED', true ); | |
| // Limit the number of saved revisions | |
| define('WP_POST_REVISIONS', 3); // any integer, but don't go crazy | |
| // Disable the post-revisioning feature | |
| define('WP_POST_REVISIONS', false); // kill the bloat | |
| //change autosave interval | |
| define('AUTOSAVE_INTERVAL', 160); // in seconds, don't go nuts | |
| //change trash emptying interval | |
| define('EMPTY_TRASH_DAYS', 7); // empty weekly | |
| //disable automatic trash emptying | |
| define('EMPTY_TRASH_DAYS', 0); // disable trash | |
| //setting up error logging | |
| @ini_set('log_errors','On'); | |
| @ini_set('display_errors','Off'); | |
| @ini_set('error_log','/home/path/domain/logs/php_error.log'); | |
| //disable wp-cron - needs to be replaced by a real cron job | |
| define('DISABLE_WP_CRON', 'true'); | |
| //increase/decrease memory for WP | |
| define( 'WP_MEMORY_LIMIT', '512M' ); | |
| //increase/decrease memory in the dashboard | |
| define( 'WP_MAX_MEMORY_LIMIT', '512M' ); | |
| //allow administrators unfiltered uploads, i.e. any file extension | |
| define( 'ALLOW_UNFILTERED_UPLOADS', true ); | |
| //add your wp.com key - similar for other services | |
| define( 'WPCOM_API_KEY', 'YourKeyHere' ); | |
| //not sure about this one - enable trash for media files | |
| define( 'MEDIA_TRASH', true ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment