How to Disable, Remove and Delete Post Revisions in WordPress
WordPress by default creates revisions of your posts automatically. Whenever you save a page or post, the older version is retained so that you can revert it back at any time. However when you publish more posts on your blog, it will make your database slow and ultimately slows down the loading time of your site. Today we would like to show you how to disable and remove post revisions in WordPress.
How to Disable Post Revisions in WordPress
Open wp-config.php located in your WordPress root directory and add the following code:
You can also disable WordPress’s post revisions function by using Disable Revisions plugin.
How to Manually Remove and Delete Post Revisions in WordPress
1. Sign in your web hosting account
2. Go to Database section and look for phpMyAdmin
3. After you are redirected to phpMyAdmin interface, select your WordPress database
4. Click on SQL tab
5. Copy and paste the query below and click “Go”
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'
6. Now you should be able to see the number of rows that have been deleted from your database