Control how much wordpress post revisions are saved

October 31, 2008

Post revisions is a cool feature, but you probably know that it increase the size of your WordPress database. If you want to limit how many post revisions can be saved by WordPress, or even disabling this functionality. You have to edit your wp-config.php file. The wp-config.php file is WordPress configuration file, where you defined your database parameters when you installed WordPress. It is located on the root of your WordPress install. To limit post revisions, just add the following lines: define ('WP_POST_REVISIONS',... [Read the full story]

Batch deleting wordpress post revisions

October 30, 2008

Post revisions, a WordPress 2.6 new feature can be very usefull, but it also increase the size of your MySQL database. Sure, you can manually delete posts revisions, but that’s a very long and boring work. Another solution is what I’m going to teach you: Batch deleting post revisions. First of it all, login to your phpmyadmin and select your WordPress database. Once done, click on the sql button to open the sql command window. Paste the following sql command in the sql window: DELETE FROM wp_posts WHERE post_type = "revision"; Work’s... [Read the full story]

Adding Post Feeds to the wordpress Header

October 29, 2008

WordPress generates a unique RSS feed for each post on your blog, which can by default be accessed in the post metadata section below the post itself. However, in order to make the most of your feed you need a link element pointing to it, telling browsers, bots, and whatever and whoever else might be accessing your page that this is a feed, not just any old XML file. Unfortunately WordPress doesn’t provide a dedicated option for doing this yet, so we’re going to have to make one ourselves. <?php if (is_single())... [Read the full story]

Change wordpress author attribution on all posts at once

October 29, 2008

Some bloggers makes the mistake to write their first posts under the name “admin”, until they realize that it’s absolutely not personal. But then, modifying author attribution on each post takes a lot of time. To achieve this, we’ll use phpmyadmin and the SQL language. As the following commands will modify your WordPress database, don’t forget to create a backup before running any command throught phpmyadmin. The first thing to do is getting the IDs of WordPress users. Once logged in phpmyadmin, insert the following... [Read the full story]

Add a rss link on each wordpress post

October 29, 2008

How to create a rss link displayed on each post? Althought this is very easy to do, many WordPress users seems to wonder how to do it. The answer is simple. To create a rss suscribtion link under each post, edit the single.php file from your theme. Locate the WordPress loop, and simply add the link below.   <?php if (have_posts()) : while (have_posts()) : the_post(); // WordPress loop ?> <div class="rss-box"><a href="http://feeds.feedburner.com/livexp">Enjoyed this post? Suscribe... [Read the full story]