Useful Code Snippets for WordPress 

A collection of WordPress code snippets that allow you to change the functionality of WordPress.

Remove the URL Field from the WordPress Comment Form
Require Minimum Comment Length
Remove Auto Linking of URLs in WordPress Comments
Automatically link Twitter usernames in WordPress
Exclude Pages from WordPress Search Results
Redirect To Post If Search Results Return One Post
Redirect a Successful Registration to Specific Page
Change Your WordPress Login Logo, URL, and Title
Change the Author Slug URL Base
Allow PHP in Default Text Widgets
Change the Number of Default Post Revisions
Empty Your WordPress Trash
Modify WordPress Automatic Updates
Automatic Database Optimizing

Origen: Useful Code Snippets for WordPress – WordPress Theme Detector

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