How to decrease wordpress database size

To decrease your wordpress database size follow the below steps.

1.AutoSave Interval

In wordpress when you editing a post, it automatically saves at a specific time interval. The default time is 60 seconds.To save your database just increase the time delay.To do this, Open your wp-config.php file and add the below code.

define('AUTOSAVE_INTERVAL', 500 );  // seconds


2.Post Revisions

Post revisions is one of the great feature in wordpress but it also increase your database size.It allows reverting to a previous version of that post or page in wordpress.
To disable this function,Open your wp-config.php file and add the below code.

define('WP_POST_REVISIONS', false );

Or just limit the Number of Post Revisions replace false with number.

define('WP_POST_REVISIONS', 3);
If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



Also Read:  How to Limit Failed Login Attempt Attacks in WordPress

Leave a Reply