How to Limit or Disable Pages and Posts Revisions of a WordPress Website Using cPanel

WordPress offers a fantastic feature to save the draft of your blog posts and pages; it helps you from losing your precious content.

Every time you save a post, the database stores its copy. But the problem occurs when you have many copies of the same post/page. As you know, a database plays a vital role in the page loading time of a WordPress website; you must keep it optimized.

Many people might have more than five copies of a single blog post in their site’s database, which directly increases its size and slows down the speed.

To maintain a healthy site, you can either choose to limit or disable the post revisions. When you have multiple authors, the post revision can lead to a poor page loading time.

In this tutorial, I am going to walk you through a simple process to disable or limit post revisions using the wp-config.php file.

Learn to Limit Post Revisions Using cPanel

First of all, if you’re the sole author of your site, you might want to limit the post revisions instead of disabling them.

WordPress allows you to keep unlimited numbers of revisions of the same blog post or page; you can limit them to three, which is a convenient number.

As always, you require the understanding of cPanel and the wp-config.php file. You may already have read about such a file; it’s one of the most vital files for a WordPress site.

I hope you know how to edit wp-config.php. If not, let me show you the guide.

Follow the process.

Step 1:

Open your cPanel account and start looking for the file manager icon, because that’s where all the data of your WordPress website is available.

How to Limit or Disable Pages and Posts Revisions of a WordPress Website Using cPanel

The layout of cPanel may vary, depending on the web hosting company you have. Bluehost offers a blue layout, Hostinger maintains a purple color, Siteground also uses a different design theme.

Don’t you worry about anything, you can easily find the file manager. Click to open.

Step 2:

On this new tab in the browser, you can see many files and folder. But you need to make sure; you’re in the root directory.

How to Limit or Disable Pages and Posts Revisions of a WordPress Website Using cPanel

By default, cPanel may show you the home directory. Navigate to public_html from the left-hand sidebar. Click to open.

Step 3:

Now you see the core files of your WordPress site. You can easily find the wp-config.php file. Right-click to edit.

How to Limit or Disable Pages and Posts Revisions of a WordPress Website Using cPanel

As usual, you can also use the standard Edit option shown on the cPanel navigation menu. And if you’re hosting multiple websites on the same web hosting, you have to open the root directory of the domain you want to edit.

Mostly, the WordPress installation resides inside the folder name of the domain you have.

Step 4:

A popup appears to ask to disable encoding. Just, click on the Edit button a new tab opens up in the browser.

How to Limit or Disable Pages and Posts Revisions of a WordPress Website Using cPanel

Step 5:

You can see lots of coding lines. Don’t be afraid, all you need is to copy the code and paste inside the wp-config.php file.

define('WP_POST_REVISIONS', 3);

Click on Save Changes. From now onwards, WordPress keeps only three recent drafts of your blog posts.

How to Disable Post Revisions

Sometimes, when the size of a database increases so much, you may in need to disable post revisions. When having a big website with thousands of posts, you can imagine the size of a database having three revisions.

Disabling post revisions can help you maintain a fast website. There is nothing different about such a task. You have to follow the exact steps as mentioned above.

But the code you have to add is a little bit different. Instead of a number, you have to fill in “false.”

Let me show you the code.

define('WP_POST_REVISIONS',  false);

Save the file, and you’re good to go.

Depending on your requirements, you can choose either. Congrats, you have successfully learned to limit and disable page and post revisions of your WordPress site.

I Hope You Can Take the Perfect Decision to have a Fast Loading Website

Most of the WordPress users ignore the database optimization and how it affects the website’s page loading time. Pages and posts revisions can put a significant impact on a website’s speed.

I remember when I encountered with a poor page loading time because of post revisions. I checked the database, and there’re so many copies of the blog posts.

I suggest you limit the number to three.

Conclusion

WordPress has some exciting features to offer. But sometimes, people don’t understand the concept and blame the platform.

Adding a one-line code solves all the problems and helps you maintain a fast loading WordPress site. I hope you can accomplish such a task with no difficulty.

Check out these top 3 WordPress hosting services:

HostArmada
$2.49 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0
IONOS
$1.00 /mo
Starting price
Visit IONOS
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.0
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.3
Ultahost
$2.90 /mo
Starting price
Visit Ultahost
Rating based on expert review
  • User Friendly
    4.3
  • Support
    4.8
  • Features
    4.5
  • Reliability
    4.0
  • Pricing
    4.8

How to Disable the wp-cron.php File for Your WordPress Site Using cPanel

This how-to guide explains why you should disable the wp-cron.php file to improv
3 min read
Arvind Singh
Arvind Singh
Hosting Expert

How to Delete Extra Database Tables After Uninstalling a WordPress Plugin

Not all the plugins come with an option to delete all the settings
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Edit the CSS for your WordPress Site Using the cPanel Hosting Control Panel

As you know, the design of a WordPress website is controlled by
4 min read
Avi Ilinsky
Avi Ilinsky
Hosting Expert

How To Edit Your WordPress Website's .htaccess file Using cPanel

There are many files and folders present in the WordPress direc
4 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top