Blog, Travel, WordPress

WordPress: How to Change Autosave

This article provide tips on how to change autosave in WordPress. Autosave feature is available since version 2.1, which periodically saves post draft to database on the server. By default AutoSave occurs every 60 seconds, meaning that if browser or computer suddenly freezes then you just lost a job during the last 60 seconds of works.

Sounds good, but because autosave makes server works every 60 seconds when editing post, this could potentially be a big problem if you open lots of posts at the same time to be edited simultaneously. Short interval autosave would also be a problem if your blog has many active writers.

In addition to extending autosave interval, you should avoid opening and editing many posts at the same time. Close immediately edited posts when you have finished with them to ease server's work. It's good that since version 3.6, WordPress added local storage feature in the user's browser, so there is a backup in a local browser despite no internet connection.

How to modify AutoSave, follow these steps:
  1. Login to cPanel, open File Manager
  2. Open wp-config.php located WordPress installation directory (below .htaccess)
  3. Copy paste the following line into wp-config.php:
    define('AUTOSAVE_INTERVAL', 3600);
    The 3600 is in second, which means autosave occurs every hour.
  4. Save

If an hour is still at risk, you may set every 12 hours, 24 hours, or a year (in seconds). If really do not need autosave feature, you can use a very large number, for example:
define('AUTOSAVE_INTERVAL', 999999);

You should also limit the number of post revision to have slimmer database, or even eliminate it altogether.

To limit the number of post revision to 3, place the following line in wp-config.php:
define('WP_POST_REVISIONS',3 );

To completely turn off the post revision, use the following line:
define('WP_POST_REVISIONS', false );

A good practice is before pressing the "Save Draft" or "Publish" button, copy the entire post draft to memory or paste and save it to a text-editor, so you will not lose it when there's a problem with internet connection or your server.

, seorang pejalan musiman dan penyuka sejarah. Penduduk Jakarta yang sedang tinggal di Cikarang Utara. Diperbarui: January 24, 2017.

Leave comments

Type it first, then click "Login ..." or "Posting".

« Newer©2021 FollowOlder »

Treat me for a cup of coffee, or just pray for those who make your life better.