Navigation:

In this article I'm going to teach you how you can basically disable the WordPress autosave feature that is used while you're editing pages or posts. This can help prevent your account from using up excessive server resources while you're working on your WordPress site.

By default WordPress will autosave any pages or posts that you're working on once a minute, so if you happened to start working on a new post and then you walked away from your computer those autosaves would continue to happen.

UPDATE 2/18/2014: Starting with WordPress 3.6 the below options still disable the WordPress autosave functionality. However with the new WordPress HeartBeat API, simply using the steps below won't completely limit the amount of admin-ajax.php requests the dashboard sends to the server.

Please review our guide on WordPress Heartbeat and heavy admin-ajax.php usage for more information.

Disable WordPress autosave with AUTOSAVE_INTERVAL

Using the steps below I'll show you how you can modify your WordPress wp-config.php file to functionally disable the WordPress autosave feature by setting the AUTOSAVE_INTERVAL value to an entire day.

Doing it this way your page or post will get automatically saved once, then after that you would just need to manually click on Save Draft instead of relying on WordPress to do it once a minute for you.

  1. Login to your cPanel.
  2. Access the cPanel File Manager Code Editor and navigate to your wp-config.php file.
  3. Enter in the highlighted code towards the top of the wp-config.php file:

    * @package WordPress
    */

    define('AUTOSAVE_INTERVAL', 86400);

    // ** MySQL settings - You can get this info from your web host ** //

    After that click on Save Changes at the top-right.

    This sets how often the WordPress autosave should run, and in this case we've set it to 86400 seconds which is an entire day. So this effectively disables the autosave functionaility.

    With the WordPress autosave disabled you'll want to be sure that you are periodically clicking on Save Draft while working on a page or post to ensure that you don't lose any content, as now WordPress will not be autosaving it for you.

Default autosave settings in use

Here is an example from my WordPress access log prior to making this change while I was editing a post, you can see the requests are happening every minute:

123.123.123.123 - - [29/Jan/2013:14:21:53 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 187 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:14:21:53 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 180 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:14:22:40 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 220 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:14:23:40 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 220 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:14:24:40 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 199 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:14:25:40 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 199 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:14:26:40 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 199 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:14:27:40 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 199 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"

Updated autosave settings to 5 minutes

After increasing the AUTOSAVE_INTERVAL to 300 seconds (5 minutes), you can see that the requests are now spaced 5 minutes apart:

123.123.123.123 - - [29/Jan/2013:15:33:23 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 199 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"
123.123.123.123 - - [29/Jan/2013:15:38:23 -0500] "POST /wp-admin/admin-ajax.php HTTP/1.1" 200 199 "http://example.com/wp-admin/post-new.php" "Mozilla/5.0 Chrome/24"

You should now understand why WordPress could potentially use up excessive resources when you walk away from your computer in the middle of editing a page or post.

Another way to ensure that WordPress isn't using up resources while you're not doing anything is to be sure to log out of the WordPress admin dashboard when not in use, and also disabling the wp-cron.php script in WordPress.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve our Support Center:
Email Address
Optional, but our team may contact you for more information.
Like this Article?

Comments

Post a comment
n/a Points
2014-04-05 10:16 pm

Hello sir, Thank you for your informative post . recently Hostgator took my website down for excessive resources use and I am a newbie don't know how to handle with these issue but your article is awesome and help me a lot to optimized my wordpress website.

Thank you again.

Staff
10,091 Points
2014-04-06 10:02 pm
Hello DK Patel,

We are happy that we were able to assist! Please feel free to ask a question at any time should you need additional help.

Kindest Regards,
Scott M

Post a Comment

Name:
Email Address:
Comment:
Are you a bot?
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

News / Announcements

West coast connectivity issue 4/22/2014
Updated 2014-04-22 02:20 pm EST
Hits: 602

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Need more Help?

Search

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!