Home » Web development » Deleting WordPress Post Revisions Using Code

Deleting WordPress Post Revisions Using Code

 

Deleting post revisions from your database is one of those things that yis possible to do without having to install a plugin, although there are plugins for it.

With PHPMyAdmin you can execute the following SQL query:

DELETE from wp_posts WHERE post_type = “revision”;

This SQL query removes the old revisione of posts from your database. They have a post_type = “revision” markup.

Don’t forget to create a backup of your database prior to running the above query.

Leave a Reply