What Will I Learn?
- You will learn about the autosaves feature in WordPress.
- You will learn to locate and make changes to WordPress configuration
wp-config
file. - You will learn to change the default Autosave time interval in WordPress.
Requirements
- A WordPress powered blog/website.
- Control Panel Access to your web host server.
- Little programming knowledge (optional)
Difficulty
- Basic
Tutorial Contents
If you are a WordPress user you must have already known that WordPress has this default Autosaves feature enabled to all post and pages. By default, it has the time interval of 1min(60secs) for an autosave. That means WordPress automatically saves your work as a draft in every 1 min with this autosave feature. This way, if we accidentally lose or done something terrific to our work, we can still find the previous autosave as a draft. But unlike revisions autosave does not store all the previously saved version, actually, it overwrites the previous draft by the newer one.
So anyone can find autosave an awesome and useful feature including myself. However, this could be annoying to have this feature especially when you work longer time making your post within WordPress editor. On the other hand, it could consume lots of your CPU power while working on WordPress editor having that autosave feature enabled for shorter interval like 1 minutes.
For my case, I prepare most of the writing parts on the external editor and manage only images within WordPress dashboard so I don't really need that feature consuming my resources. Hence I always set a bigger autosave time interval somewhere around 1000 seconds.
So today in this tutorial I want to show you how can we change the Autosaves Time Interval feature in WordPress. It's not the harder thing and you can do it on your own by simply editing and adding the following lines of code inside the WordPress configuration wp-config.php
file.
/** Autosave Interval In Seconds. */
define('AUTOSAVE_INTERVAL', 1000 );
For this purpose, you need server level access to your WordPress website to be able to edit wp-config.php
file.
There are two common methods to access and edit wp-config file of your WordPress site.
If you have your server's cpanel and its password then you can access and edit the wp-config.php file via File Manager of your server's cpanel.
Or if you have your website's FTP login information you can access and edit the wp-config file via FTP Clients like FileZilla.
In this tutorial, I will show you how could we access and edit wp-config.php
file via File Manager provided by web host's cpanel.
Follow these step by step guide to reset the default autosave time interval in WordPress with your custom time.
1. To open the file manager, login to your server account, go to cpanel and open the file manager.
This feature solely depends on web host provider, so there could be a different way to access file manager on your web host server account.
2. Locate wp-config.php inside the wordpress installation directory.
Now navigate and open your website/blog's WordPress installation folder(Wordpress Root Directory) and locate a file named wp-config.php
. It should be somewhere there along with wp-cron.php
as shown in the figure below.
3. Back up and edit the wp-config.php
file.
After locating the wp-config file, download a copy of it as a backup. It is necessary to make a backup because a small mistake on wp-config file can damage your whole website.So always take precautions.
Then click on edit the button to edit the wp-config
. The buttons may appear as shown in the figure below but can vary from server to server.
4. Insert the following code and save it.
/** Autosave Interval In Seconds. */
define('AUTOSAVE_INTERVAL', 1000 );
Add the following one line of code inside wp-config.php
file and save it to take action just like in the screenshot below.
If you have followed every step correctly this should now reset the default autosave time interval to 1000 seconds. Make sure to change this time according to your desire.
Curriculum
Here are some of my other WordPress tutorials series you might like.
How to disable XML-RPC in WordPress for better security enhancement without using a plugin?
How to Block Unauthorized Access to wp-config.php, Wordpress configuration file via .htaccess?
Disallowing Directory Browsing In Wordpress Via .htaccess File for Security Purpose.
How to Disable file editing(themes and plugins) feature within WordPress dashboard
Posted on Utopian.io - Rewarding Open Source Contributors
Thank you for the contribution. It has been approved. From next time, try to go into more technical aspect. This one was not too technical but at-least it was a little bit, that's why I approved your contribution.
You can contact us on Discord.
[utopian-moderator]
Thanks, I'll keep that in mind!
Great! The post on How to disable file editing was very useful to me.
thanks :)
Thank for share.
I hope your post will be sucses.