πŸ”΅
WordPress

Managing and Optimizing WordPress Autosave and Revisions

πŸ“… 8 October 2026 ✏️ 8 October 2026 ⏱ 4 min leestijd

Learn how to configure and clean up WordPress autosave intervals and revisions for a faster database and better site performance.

WordPress automatically saves drafts while you write through autosave, and stores a full revision of your content with every change. Useful against data loss, but without management your database grows unnecessarily fast, negatively affecting load times and admin speed. In this article you’ll learn exactly what autosave and revisions do, how to configure them via wp-config.php, and how to safely clean up old revisions.

What are autosave and revisions?

Autosave is the feature that by default saves an interim draft of your post every 60 seconds, so you don’t lose work in case of a browser crash or connection issue. Every autosave and every manual save results in a revision: a complete copy of the post at that moment, stored as a separate item in the database.

By default, WordPress keeps an unlimited number of revisions. An article edited ten times therefore produces ten extra database rows. With hundreds of posts and years of editing, this adds up considerably, resulting in a heavier database and slower queries.

AutosaveRevisionDatabase grows

Adjusting settings via wp-config.php

You can configure autosave and the number of stored revisions directly in the wp-config.php file, which you can access via Plesk’s File Manager or SSH.

1

Open wp-config.php

Log in to your hosting environment, for example via Plesk, and open wp-config.php in the root of your WordPress installation with a text editor.

2

Adjust the autosave interval

Add above the line “That’s all, stop editing!”: define(‘AUTOSAVE_INTERVAL’, 300); This increases the interval to 5 minutes, significantly reducing the number of database write operations.

3

Limit the number of revisions

Add: define(‘WP_POST_REVISIONS’, 5); This way, WordPress keeps a maximum of five revisions per post. Use false to disable revisions entirely, and 0 (without quotes) to only disable autosave.

4

Save and verify

Save wp-config.php and test whether editing a post still works normally. The settings take effect immediately, without needing to restart the server.

πŸ’‘ Tip: Before editing wp-config.php, always make a copy of the file, so you can easily revert if something goes wrong.

Cleaning up old revisions

New settings prevent further growth, but don’t resolve existing buildup. You can remove old revisions in two ways.

Via an SQL query in the Plesk Database Manager: DELETE FROM wp_posts WHERE post_type = ‘revision’; Always make a backup first, for example via the Backup Manager in Plesk.

Via a plugin such as WP-Optimize: this is safer for those unfamiliar with SQL. The plugin only removes revisions and drafts, never published content, and shows in advance how many items will be cleaned up.

Maintaining your database long-term

A one-time cleanup isn’t enough; without the settings from step 2, the database will build up again. Therefore, plan periodic maintenance, for example every quarter, and check the database size via Plesk. Also keep in mind plugins that store their own data and spam comments, which likewise take up space.

A fast database is especially noticeable in the WordPress dashboard and when searching within content. Combine this with good web hosting on NVMe storage for the best result, and consult the knowledge base if you get stuck managing your database.

Frequently Asked Questions

Can I disable autosave completely?

Yes, with define(‘AUTOSAVE_INTERVAL’, 0); but this is not recommended, as you may lose work in case of a crash or connection issue.

What happens if I set revisions to 0?

WordPress will then no longer save revisions, while autosave keeps working. This is only advisable if you regularly save manually yourself.

Does WP-Optimize also delete published posts?

No, the plugin only removes revisions and drafts. Still, always make a backup first before cleaning up.

How large can my database become due to revisions?

This depends heavily on the number of posts and edits. With a lot of content and years without cleanup, revisions can make up a significant portion of the total database size.

Conclusion

By increasing the autosave interval, limiting the number of revisions in wp-config.php, and cleaning up existing revisions, you keep your WordPress database compact and fast. Combine this with periodic maintenance for lasting good performance.

View web hosting β†’

Was dit artikel nuttig?