Change The Amount Of WordPress Post Revisions Stored
WordPress has a autosave feature which will automatically save a revision of your post as you are typing. But the problem with this comes when you have a WordPress blog with hundreds of posts. Each one of these posts will have a number of automatically saved post revisions. This can quickly add thousands of a posts to your wordpress database.
The following WordPress snippet will allow you to pick how many post revisions each post has or if you want to turn off the auto save feature.
To change the post revision to save 3 revisions add the following to your wp-config.php file.
To turn off the auto save feature add the following to your wp-config.php file.
Learn how to code with Treehouse
- Learn projects with access to 1000+ videos
- Practice live with our Code Challenge Engine
- Get help in our members-only forums
Join the weekly newsletter
Sign up for our newsletter. You'll be updated on new tutorials as they come available.
Subscribe today and get a 50% discount code to Paulund