How to delete revisions on WordPress or set a WordPress revisions limit on posts or pages without using any plugin?

Delete all your WordPress revisions or set a WordPress revisions limit manually, without using any plugin but codes on the database (and optimize it). This will remove all the extra revisions made on your WordPress website. Additionally, using a simple line of code, you will also learn to add a WordPress revisions limit i.e. there shall only be X number of revisions on your pages or posts no matter how many revisions you’d make on your site.

The process is very simple, and if done correctly it shouldn’t give you any issue. However, we strongly recommend you to BACKUP YOUR DATABASE before making any changes to the database for safety purposes. Just-in-case anything doesn’t go as planned you can always restore with your backed up database. Cleaning up the old revisions, will massively reduce your site’s database size and as well help to optimize your database improving the overall performance of your site.

Thus, kindly follow these easy steps and make your database clean with unnecessary revisions numbers stored on your site.

Thank you.



Welcome to Hey, Let's Learn Something!

Please sign up here to receive the latest updates on our blogs, tutorials and download section :)

Thank you for subscribing :)