≡ Menu

SQL command for removing post revisions in WordPress with phpmyadmin

SQL

By deleting your post revisions in WordPress. You will  make the file size of your wordpress MySQL database file smaller while keeping all your current posts on your blog.

Back up your database before executing the command. Just in case you did something wrong or phpmyadmin did something wrong.

SQL command for removing post revisions for WordPress

DELETE FROM wp_posts WHERE post_type = “revision”;

You can execute SQL window in phpmyadmin by clicking the SQL button in Phpmyadmin sidebar , pasting it in the SQL code in the window and pressing Go button.

SQL

SQL

SQL command box

If you want to  disable post revisions for WordPress there are plugins available to disable or custumize how many post revisions you can have per post.

Erasing and disabling posts revisions can save space on your WordPress database.

0 comments… add one

Leave a Comment