Showing posts with label WordPress. Show all posts
Showing posts with label WordPress. Show all posts

Friday, 1 July 2011

How to Delete Post Revisions in WordPress

Ads by Google | Posted on 20/06/2011

How can you delete post revisions in WordPress blogs? Post revision is a cool way in which WordPress autosaves your posts while you type. This helps to recover posts should your browser crash, or internet crash, and you can always restore an older version of the post. But Post revisions tend to pile up in your database.

We use Vaultpress WordPress backup and its stats informed us that we had over 4000+ posts and 8000+ post revisions! The number of post revisions is double the number of posts! No wonder the database file size is growing so fast. Every post we edit keeps accumulating post revisions. If there are frequently edited posts, the revision can be a large number.

Of course you can stop post revisions by adding the following to wp-config.php (in root of your WordPress installation)

define('WP_POST_REVISIONS', false);

But post revisions have really helped me recover crashed posts, so I want to continue using them. So I add these to wp-config.php instead.

define('WP_POST_REVISIONS', 3);
define( 'AUTOSAVE_INTERVAL', 120);

This saves only the latest 3 post revisions of any article (note false is replaced by 3, you can add a different value if you like), so multiple edits will not pile up these post revisions. Next I increased the autosave interval to 120 seconds (default is 60 seconds). So this lets me continue using post revision with decreased saves and only latest saves. But this does not delete my 8000+ useless post revisons over 3-4 years old, which I no longer need.

Download the Delete Post Revisions Plugin and it will delete all the post revision there are. This is how the admin panel of the plugin looks like. We did not click the check box as there were too many revisions. There is only 1 button and that does the job.

delete-post-revision

It took the plugin over 20 minutes as we had over 8000 post revisions and we had to repeat 3 times till we got the message that no post revisions could be detected.

deleted revisions

So now our databases is much cleaner and lighter as we have deleted unnecessary post revisions and have modified good settings for post revisions to work well in future.

After reading this article, readers liked these articles Fix WordPress Feed XML Parsing Errors: Delete Blank LinesCreate Expandable Post Summaries in WordPressHow to Get Post Preview Frame Back in WordPress 2.2WordPress 2.5 Changed My Post Writing HabitsHidden Formatting Options in WordPress Post EditorReverse Blog and Post Order of Title Tags in WordPressTop 3 Tools To Permanently Delete Files From Computers
All comments are moderated. No HTML.

View the original article here


This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.

How to Optimize WordPress Database Easily

Ads by Google | Posted on 23/06/2011

What is the best and easiest way to optimize WordPress database? It is a good idea to optimize your WordPress database tables as useless data “Overhead” piles up over the years and slows your database down.

Our WordPress admin was getting really slow and so were the increasing  number of resource alerts. Like most WordPress bloggers, we too were always hesitant to meddle with the database fearing irreversible loss of data. There are many powerful WordPress database plugins, but they all seem too powerful and capable of modifying so much data, that it seemed better in expert hands. So we were looking for something very simple, easy and trustworthy.

The we found the amazing Optimize DB plugin by Yoast, who is a well known creator of some other amazing plugins too. We simply installed and activated the plugin and it automatically analyzed how much database overheads it could save instantly. Then we backed up the database, though Vaultpress saves our latest database files automatically.

This what a partial screenshot of what we got. The plugin was going to optimize our WordPress database and save it by 33%!

optimize database

Well there is only one button to click, and we clicked it. And in the next few seconds, it was all done.

WordPress Database tables optimized

The WordPress admin speed seems better, site resource alerts seem lower too.

Warning: Always back up your full database before attempting any database changes. This seems standard disclaimer, but is very essential to restore your database if something goes wrong (and sometimes things do go wrong).

After reading this article, readers liked these articles WordPress 2.1 Will Require MySQL 4.0 DatabaseHow To Backup and Restore WordPress DatabaseHow to Fix Missing WordPress Database Backup EmailsCreate Custom WordPress Database Error PagesHow to Create Daily Backups of WordPress MySQL DatabaseOptimize Google Adsense For Blogs13 Lucky Ways to SEO Optimize Blog Posts
All comments are moderated. No HTML.

View the original article here


This post was made using the Auto Blogging Software from WebMagnates.org This line will not appear when posts are made after activating the software to full version.