How to set WordPress to save an unlimited amount of revisions

By | July 31, 2015

With WordPress intallations, the default is usually to store a limited amount of revisions. With my standard WordPress installation using cPanel QuickInstall, the revisions where stuck at ‘2+’. If you tweak your posts a lot, you might want WordPress to save more revisions. However, there is no built-in setting in the back-end of WordPress to change this. You’ll have to manually change this setting in one of your website’s files.

In the video below, I’ll show you how to change that file using cPanel. However, if you don’t have cPanel, you can still change this file. Alternatives are using an FTP client to access your website files, or using a WordPress plugin to access your files.

Full video instructions:

Access wpconfig.php using cPanel filemanager

Log in to your cPanel, and scroll down to the ‘Files’ menu. Here, click ‘File Manager.

access-file-manager-cpanel

Select the directory that you want to change this setting for, and click ‘Go’.

access-file-manager-cpanel-document-root

Here, find a file called ‘wp-config.php’, select it, then right-click and click ‘edit’.

file-manager-edit

A pop-up will show up. Click ‘Edit’ again.

file-manager-edit-2

Changing the amount of revisions

In this file, scroll down to find the line that says:

define('WP_POST_REVISIONS', 1)

wordpress-revions-setting

Here, change the amount to any number of revisions you want. For unlimited revisions, change it to ‘-1’, so you’ll get:

define('WP_POST_REVISIONS', -1)

Click ‘Save’ to save the changes.

save-changes-file-editor

 

That’s it; WordPress will now store an unlimited amount of revisions for your posts!

wordpress-revions-before-after

Before and after the changes to the revision settings.

 

Leave a Reply

Your email address will not be published. Required fields are marked *

*