IF you want, you can disable revisions in first place (No need to run CRON then)
To disable them go to wp-config.php and add this line:
define('WP_POST_REVISIONS', false );
Or to limit to 10 revisions
define('WP_POST_REVISIONS', 10);
And to delete all current revisions you can run this SQL query:
DELETE FROM wp_posts WHERE post_type = "revision";
Here seems to be quite decent plugin to do that for you (It does a lot more too)
https://wordpress.org/plugins/rvg-optimize-database/
Also DO backups
And another SO thread:
Safest way to bulk delete post revisions
Related Posts:
- What happens if I delete all the rows that represents a post revision from the posts table into WordPress database?
- SQL Query for getting all posts in their latest revised state
- Reset/Reorder posts ID in the MySQL wp_posts table
- How do I find which articles are missing a featured image in The WordPress database?
- Remove a shortcode from all WordPress posts
- What do these phpMyAdmin errors mean on my WordPress databaes?
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Why my wp_posts data is so huge?
- Delete post revisions only for a single post
- Restore woocommerce orders
- How to select particular month post from table and update the post status using MySQL?
- Bulk find & replace on WordPress posts/pages (minus image paths)
- Clean up customize_changeset in DB
- SQL trigger failes with post_content
- Converting Posts to Pages
- How to change the publishing date of each posts?
- How to manually delete post from database without causing conflicts?
- When is the ‘post_content_filtered’ column in database cleared by WordPress?
- Can posts have parents?
- Where is the old post permalink slug stored?
- Separate Database Tables For Different Post Types
- MySQL Query to Retrieve Category from wp_posts
- How can I safely increase the character limit for post passwords?
- How to Group Posts by the First Letter or Number?
- Restore contents of deleted user
- How are terms connected with posts in database?
- Any way to create a revision of a post ONLY with a new button in the Meta Box?
- Saving Post Data in Another Database
- Queries take 120+ seconds on my large WordPress site
- Database hacked – random posts are modified
- Need to change all links in page content but not in post content
- Can’t update WordPress Page if post_content is Empty
- How do post IDs work in WordPress?
- Why when I create a new post I found 2 record related to this post into the posts database table?
- Get author posts count after excluding a category
- Update field in database for users
- Import custom database into wp and keep the post id
- why the posts queried from sql is more than those showed on the page?
- get last post’s link with SQL query
- Moved to a new server, backup was a day old and missing 3 posts, anyway to recover them from old host?
- Is there a function to get post info for any publish_status by post ID?
- query for filtering published posts?
- Your ideas on my though “delete or move all of the posts in a specific category when 3 days are passed”
- How Can I Always Display A Particular Post First Using WP_Query?
- Help on conditional statement to accompany wp_insert_post function please?
- MySQL: Possible to replace all of wp_posts.post_content(id#) via UPDATE + REPLACE + SELECT?
- Deleting post tags removes categories
- How can I globally italicize list of texts in the UI database or Posts? [closed]
- Is it possible to modify posts table to only read for more recent ones?
- Return records between two meta datetimes saved as strings
- WP query taxonomy optimization
- Menu Items disappearing/being empty on save or post edit
- My website is showing today’s date instead of published date since db migration to a new wordpress
- How can I change the date format of the revision list?
- MYSQL: Create SQL query to search for string and replace
- Query to fetch custom taxonomy along with post title
- How to setup default value of post_id
- Mysql update menu_order problem
- Prevent a post with a specific ID from being created
- Reusing old post IDs
- Trigger on DB make problem on wordpress?
- WordPress MySQL Search and replace with wildcard?
- Comments are in database, don’t show up in WordPress backend or frontend
- Is there a way to save different data when USER interacts with the same POST?
- Add postmeta to all blog posts
- How can I stop ‘in use’ message from intermittently blocking my wp_posts table?
- ‘posts’ table should not store the absolute image path
- Dev and prod on the same database- dev version active for IOS
- load post data into mysql
- More Than 50K Categories and WordPress Admin Panel Stop Showing Categories and Posts
- how i show manual data in a post
- How do I get a certain set of posts from the database?
- Maximum number of posts per page before affecting performance?
- Surrogate ID for posts, is there an alternative field in the posts table?
- get backup file from wordpress database in x days
- Expired Post with More Recent Time Stamp?
- I moved my site to another server, wp admin works so does the front page, but posts don’t work
- Can’t seem to replicate permalink structure for localhost development site
- Extra field in wp_post instead of postmeta
- Voting System, database connections?
- When I click edit on a post, all the content disappear. Does anyone know how to fix this?
- SQL query to remove first image in all posts
- Given two custom post types: Automatically add meta fields from one custom post type to another
- Delete junk text from all the post using my sql command
- FIND and REPLACE wp_posts AND IGNORE custom post type mysql query
- Load posts from external source if not found in database
- How to create a post based on data in a table?
- Is there a maximum amount of pages for a multi-page post?
- If meta_key exists then don’t select this post?
- How to make category for word post_content
- What effect can a large wp_post table have on overall site performance?
- How to update wp_posts with just the returned comment count from wp_comments (SQL GROUP BY)
- How can I merge a several related posts into one post?
- Restore posts, but only posts that exist in my database backup
- Change permalinks in posts via SQL
- Is it safe to totally unregister the default “post” Post Type
- How to get a list of all posts and their categories?
- WordPress Post Query Using Custom native MySQL like St_Distance_Sphere
- Can’t save/get Patterns’ `post_content` attribute
- How to extract and reveal code from SQL database in WordPress