Useful Code Snippets for WordPress 

12. Change the Number of Default Post RevisionsFile to Edit: WP-Config.phpThe WordPress revision system saves a copy of your posts and pages every time you update them. This is handy as it allows you to refer back to previous versions of your article, compare drafts, and correct mistakes.The problem is that WordPress does not limit how many revisions it saves. Therefore, if you have saved an article 100 times, your website will store 100 revisions of the article. This can greatly increase the size of your database as one article with 100 revisions will take up just as much room as 100 articles with no revisions.It is therefore practical to limit the number of revisions that are stored. On my own websites, I limit revisions to two. This allows me to refer back to the last few copies of an article, without taking up too much room in the database.You can limit revisions by adding the code snippet below to wp-config.php.1define( ‘WP_POST_REVISIONS’, 2 );Revisions can be disabled altogether by using the following code.1define( ‘WP_POST_REVISIONS’, false );Be careful about disabling post revisions. If you lose your internet connection or accidentally close your browser tab, you could lose everything you had written since you last saved your article.Source

Origen: Useful Code Snippets for WordPress – WordPress Theme Detector



Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de

Estás comentando usando tu cuenta de Cerrar sesión /  Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )


Conectando a %s