How do I disable post revisions feature found in wordpress version 2.6.x and v3.x.x based blog site?
By default, post revisions are enabled for all wordpress based blog. It will save copies of each edit made to a post. This allows the possibility of reverting to a previous version of that post. However, you can turn off the feature by editing wp-config.php file. This file is located in your blog directory. You can download this file using the ftp command or ftp client. If you've ssh access directly edit the file using a text editor such as vi or nano. Make sure you backup wp-config.php file.
How do I disable post revisions?
In this example, I'm going to edit the file using ssh client. Type the following command to login to your vps / vm / server called server1.cyberciti.biz using Mac OS X or Unix like operating systems:
ssh vivek@server1.cyberciti.biz
My blog is located at /nas05/httpd/vhost/cyberciti.biz. So cd into /nas05/httpd/vhost/cyberciti.biz:
cd /nas05/httpd/vhost/cyberciti.biz ### make a backup ### cp wp-config.php wp-config-backup.php
Edit a file called wp-config using a text editor called vi:
vi wp-config.php
Append the following directive:
define('WP_POST_REVISIONS', false );
OR
define('WP_POST_REVISIONS', 0 );
Save and close the file. Here is my sample wp-config.php file:
<?php define('WP_CACHE', true); define('WP_POST_REVISIONS', 0); // ** MySQL settings ** // define('DB_NAME', 'blog'); // The name of the database define('DB_USER', 'dbuser'); // Your MySQL username define('DB_PASSWORD', 'mypassword'); // ...and password define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value define('DB_CHARSET', 'utf8'); define('DB_COLLATE', ''); // You can have multiple installations in one database if you give each a unique prefix $table_prefix = 'wp_'; // Only numbers, letters, and underscores please! // Change this to localize WordPress. A corresponding MO file for the // chosen language must be installed to wp-content/languages. // For example, install de.mo to wp-content/languages and set WPLANG to 'de' // to enable German language support. define ('WPLANG', ''); define('AUTH_KEY', 'removed-for-security'); define('SECURE_AUTH_KEY', 'removed-for-security'); define('LOGGED_IN_KEY', 'removed-for-security'); define('NONCE_KEY', 'removed-for-security'); define('AUTH_SALT', 'removed-for-security'); define('SECURE_AUTH_SALT', 'removed-for-security'); define('LOGGED_IN_SALT', 'removed-for-security'); define('NONCE_SALT', 'removed-for-security'); /* That's all, stop editing! Happy blogging. */ define('ABSPATH', dirname(__FILE__).'/'); require_once(ABSPATH.'wp-settings.php'); ?>
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 0 comments… add one now }