SupportHost Blog

WordPress auto-saving and resource usage

September 5, 2016, Written by 0 comment

 

supporthost wordpress hosting risorse

As a web hosting provider our primary concern is to provide fast and reliable service. To avoid service interruptions we have s system in place to limit the resources any single account may use.

Everyday web applications require more and more resources, and sometimes on a shared environment we have to tweak the settings to avoid consuming too much resources, thus having the account suspended.

One the most recent problem we noticed is with wordpress autosaving features. This is a fantastic features that saves a revision of your post on the database, in case something goes wrong before you are able to save. The problem with this feature is that it might be resource consuming. If you write a few words and then wait a few seconds wordpress will save it on the database, you can notice it in the bottom right corner of the text editor.

supporthost tutorial wordpress auto saving

 

We have noticed some wordpress installations doing this more that 2000 times in a 2 hours time span. This operation can cause high resource consumption, thus trigger a block.

To make the situation worse, you may have some plugins interaction with this process, giving the server even more work to do.

Come possiamo aumentare l’intervallo tra i vari salvataggi automatici?

Fortunately wordpress and its docs help us:

  • open the wp-config.php file
  • Find the postion: /* That’s all, stop editing! Happy blogging. */
  • Before this row add:
define('AUTOSAVE_INTERVAL', 1800 ); // in seconds (the default is 60)
define('WP_POST_REVISIONS', false ); // disable post revisions

NOTE: If you do not want to disable revisions you can limit them to a maximum:

define('WP_POST_REVISIONS', 5); // The number of revisions you want to maintain

Values indicated above are recommended, but you can adjust them as preferred.

ivan

In the hosting business since 10+ years, working hard to provide costumers with the best possible service

Leave a reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.