Ultimate Guide to WordPress Limit Revisions: Manage Edits Efficiently

Bulletproof Backups for Your WordPress Website

Fortify your business continuity with foolproof WordPress backups. No data loss, no downtime — just secure, seamless operation.

wordpress limit revisions

Your WordPress site is drowning in an avalanche of post revisions. Each minor edit triggers a new revision that consumes space. While each WordPress revision itself may be small, multiply each post on your site with a bunch of revisions each, and watch the numbers explode. 

These accumulated revisions can slow down your database, consuming server resources and potentially inflating hosting costs.Using WordPress limit revisions can help control the number of revisions stored, keeping your database streamlined and efficient.

It could even be a hassle if you’re trying to get back the previous revision of WordPress. With countless unnecessary revisions, finding the exact one you need is like untangling a ball of yarn. Basically, it defeats the very purpose it is meant to solve. Meanwhile, your site slows down, frustrating users.If you’re facing issues like revisions not showing up in WordPress, it’s often due to settings or configurations in your wp-config.php file or conflicts with plugins.

TL;DR: Use a plugin like Companion Revision Manager to limit your WordPress revisions. If you prefer not to install an extra plugin, you can edit the wp-config.php file instead. Both options offer effective ways to manage revisions based on your preferences. 

If only WordPress could club all minor edits into one revision, you would save so much database space—and you wouldn’t need this article. Unfortunately, it doesn’t offer that capability. So, limiting your revision frequency is your best bet.

Fortunately, it is a simple fix. You can limit WordPress revisions by either tweaking your wp-config.php file or using a plugin. We’ll detail the steps of each method.

Option 1: Use a plugin to limit WordPress revisions

Using a plugin is your best bet if you want a safer and more convenient way to manage post-revisions. This method does not require you to dive into core WordPress files. Plugins like Companion Revision Manager make the process easier.

1. Install and activate the plugin: Look for the Companion Revision Manager plugin on your plugin search bar. Once found, install and activate it. Alternatively, you can download a ZIP file of the plugin from the WordPress repository and upload it.

2. Configure settings: After you install and activate the plugin, navigate to the plugin’s settings page. This is usually found with the plugin’s name on the left pane of your admin dashboard. 

3. Set the revision limit: Enter your desired number within the revision limit box and your revisions will be limited to the number.

This plugin also lets you delete existing revisions. Note that this action is irreversible. Once you decide to delete those old revisions, they’re gone for good. Make sure this is what you want before taking the plunge.

4. Save the changes: Click on the Save Changes button on the bottom left. From this point, the plugin handles everything, limiting revisions as per your preferences.

Option 2: Edit your wp-config.php file to set the WordPress limit revisions setting.

You can nip this problem in the bud by tweaking your wp-config.php file. 

Warning: Please be aware that we do not recommend this method because it carries the risk of completely crashing your website if something goes wrong. Edit the wp-config file with extreme caution. Always backup your site before making any edits to core WordPress files for easy recovery.

1. Connect to your site over FTP: Use an FTP client like Cyberduck to connect to your site’s server. You’ll have to check with your hosting provider for the credentials.

2. Locate the wp-config.php file: Once you are connected to your site’s server, navigate into the root directory. It is often labeled as public_html or www. Next, locate the wp-config.php file.

3. Copy and add the code: Open the wp-config.php file in a text editor like Visual Code Studio. Insert the following line of code just above the line that reads “/* That’s all, stop editing! Happy publishing. */“: 

define('WP_POST_REVISIONS', 5); 

This snippet limits WordPress to storing only the last 5 revisions of each post. You can replace “5” with any number that best suits your needs.

If WordPress revisions are disabled, you can easily enable WordPress revisions by adding the following line of code to your wp-config.php file: define(‘WP_POST_REVISIONS’, true)

4. Save your changes: Save the edited wp-config.php file. Upload it back to your server via your FTP client. To do this, right-click on the FTP client’s interface and select the Upload option from the menu. Click Yes if you are asked to overwrite the old file with the new one. 

5. Verify the changes: Edit a post multiple times. This is to check to see if WordPress stores only your specified number of revisions.

Note that this method only limits future revisions. This change will not delete existing revisions.

To tidy up existing revisions, consider using a database cleanup plugin like Advanced Database Cleaner. However, make sure to backup your entire site, and not just your database, before using a cleanup plugin. This ensures you can restore your site to its previous state if anything goes wrong.

The case for WordPress revisions

WordPress’s revision or version history lets you revert to earlier edits. Think of it like an activity log for your posts. Every time you make a change to a post or page, WordPress saves a complete copy of the content as a revision. Therefore WordPress revisions enable you to revert to previous versions of a post when needed. 

Should you limit WordPress revisions?

WordPress revisions are useful for tracking changes and restoring previous versions of content. However, each minor change—like a word tweak—creates a new, full copy of your content. Over time, these revisions pile up, leading to a bloated database filled with numerous redundant entries taking up your site resources.

When your database is stuffed with excess revisions, every database query—whether loading a page, searching for content, or managing posts—has to sift through a larger volume of data. This increases query execution time, which inevitably slows down your site.

An overloaded database doesn’t just affect daily performance; it also takes longer to back up and restore your site. This delay can be problematic if you need to perform quick backups or restorations due to updates, migrations, or emergencies.

A bloated database can also be heavy on your wallet, as you’re likely paying for extra storage and server capacity. 

Adjusting WordPress revision limits keeps the database small, enhancing performance and simplifying content management. It also decreases server load and makes backing up and restoring your site more efficient. Most importantly, you maintain optimal site performance, ensuring a smoother experience for both administrators and visitors.

To maintain a consistent history of your posts, with none of these issues, use a backup plugin instead. With BlogVault, you get a robust activity log to monitor every edit, along with secure backups and seamless restores to ensure your content is always protected.

Parting thoughts

Effectively managing WordPress revisions is crucial for optimizing your site’s performance and user experience. By limiting the number of revisions, you can prevent database bloat and maintain a lean, responsive website.

Fewer revisions mean streamlined content management, faster load times, and reduced server load. You’ll have a more efficient site that delights visitors and keeps your maintenance tasks under control.

While having a track record of all edits ever made is great, most sites will not require that level of a paper trail. For those that do, use a backup plugin like BlogVault instead—all the pros and none of the cons. 

FAQs

How do I limit the number of revisions in WordPress?

You can limit the number of revisions in WordPress in two ways. You can either use a plugin like Companion Revision Manager for a more user-friendly approach. Or you can manually edit the wp-config.php file by adding the line `define(‘WP_POST_REVISIONS’, 5);` to specify the number of revisions to keep. Note that we DO NOT recommend this method as it runs the risk of completely crashing your website if something goes wrong.

How do I clean up revisions in WordPress?

You can clean up revisions in WordPress using database cleanup plugins like WP-Optimize. Database cleanup plugins offer an easy way to delete older WordPress revisions and keep your database tidy. You won’t need to dive into complex SQL queries or perform manual deletions. But make sure that you take a complete backup of your site before using the plugin.

Where are WordPress revisions stored?

WordPress revisions are stored in the database, specifically in the wp_posts table. Each revision gets its own entry, containing a full copy of the post or page. This can lead to significant database bloat if not managed properly.

Do revisions slow down WordPress?

Yes, revisions can slow down WordPress, over time. Each additional revision adds to the size of your database.This makes every database query—whether it’s loading a page, searching for content, or managing posts—take longer. This can result in slower load times and a less responsive website. In turn, it hurts user experience and potentially increases server costs.

Tags:

You may also like


Fix: WordPress 403 Forbidden
Fix: WordPress 403 Forbidden

Stuck with a “403 Forbidden” error while trying to access your WordPress site? It’s a little scary and quite cumbersome but you can troubleshoot WordPress errors like this.  It’s a…

Fix: WordPress 413 Request Entity Too Large
Fix: WordPress 413 Request Entity Too Large

Fixing errors in WordPress site is like hitting a digital roadblock. It can be frustrating and disruptive. But, you’re also left wondering why this is happening to you.  The “413…

How do you update and backup your website?

Creating Backup and Updating website can be time consuming and error-prone. BlogVault will save you hours everyday while providing you complete peace of mind.

Updating Everything Manually?

But it’s too time consuming, complicated and stops you from achieving your full potential. You don’t want to put your business at risk with inefficient management.

Backup Your WordPress Site

Install the plugin on your website, let it sync and you’re done. Get automated, scheduled backups for your critical site data, and make sure your website never experiences downtime again.