Skip to content

Instantly share code, notes, and snippets.

@aydinjavadly
Created October 30, 2021 22:37
Show Gist options
  • Save aydinjavadly/bdd249277ecc6afaa5d01b41ae027943 to your computer and use it in GitHub Desktop.
Save aydinjavadly/bdd249277ecc6afaa5d01b41ae027943 to your computer and use it in GitHub Desktop.
WordPress - Speed up performance: Disable post revisions. Set autosave interval. Set trash days. Increasing public memory. Increasing the administrative memory. WordPress cron timeout.
<?php
/**
* File: wp-config.php
*
* 1. Disable post revisions
* 2. Set autosave interval
* 3. Set trash days
* 4. Increasing public memory
* 5. Increasing the administrative memory
* 6. WordPress cron timeout
*
*/
/** wp-config.php / Disable post revisions */
define( 'WP_POST_REVISIONS', false );
/** wp-config.php / Set autosave interval */
define( 'AUTOSAVE_INTERVAL', 300 ); // Seconds
/** wp-config.php / Set trash days */
define( 'EMPTY_TRASH_DAYS', 3 ); // Days
define( 'MEDIA_TRASH', false );
/** wp-config.php / Increasing public memory */
define( 'WP_MEMORY_LIMIT', '256M' ); // MB
/** wp-config.php / Increasing the administrative memory */
define( 'WP_MAX_MEMORY_LIMIT', '512M' ); // MB
/** wp-config.php / WordPress cron timeout */
define( 'WP_CRON_LOCK_TIMEOUT', 60 ); // Seconds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment