Web development and examples of PHP, jQuery, HTML5, WordPress, MySQL & AMP


How to disable and delete post reviews in WordPress

If we don’t have the post reviews disabled in WordPress the database will be filled with versions of our posts that will never be published.

By default, the posts you are editing are saved as revisions. This makes our post table increases considerably in number of records that in 99% of the cases we will not use in our WordPress. In the long term it can penalize with the performance of the database.

How to disable or remove from WordPress reviews

This solution is the most effective and drastic at the same time, since the system would no longer make any of the posts we edit self-saved. We can do it in the following way:

  1. We edit our wp-config.php and we put the next code in:
  2. We have the revisions turned off.

How to delay WordPress post review time

This solution is not bad but we would still leave trash in the database, it would be like that:

  1. We edit our wp-config.php and we put the next code in:
  2. With this line we would have a version saved every 300 seconds, that is 5 minutes.

How to Limit post reviews in WordPress

This solution is similar to the previous one, it is still not complete, we would get it this way:

  1. We edit our wp-config.php and we put the next code in:
  2. In this way we would have for each post a maximum of 5 autosave.

Manually clean the WP database

To remove the autosaved revisions we must apply this SQL code, I recommend first to make a backup…:

Cookie Policy

This website uses cookies to provide you with the best user experience. If you continue to browsing you are consenting to the acceptance of these cookies and acceptance of our cookie policy, click the link for more information.

ACCEPT
Aviso de cookies