Thursday, October 16, 2008

Useful tips to turn your Wordpress into a CMS -1

Worpress is a wonderful blogging tool which i have using for last two years. When I planned to create a new website recently, my first consideration was a good CMS and I chose joomla as the one. Joomla is one of the best open source CMS's in the world and I did design a moderate(not bad at least) web site. But still I didn't feel the comfort that I had when I was using wordpress - nothing technical, just my inertia to changes. At last I decided to go back to wordpress and tweak it for my needs. With some basic tweaking and many plugins, I made a website easily. I will post them here for anybody want to make use of this.

Disabling comments and pings

One of the primary requirement when converting a blog software to cms is to disable comments and pings (this depends on how you want your site to be) . To do this we will alter the WP database a little.

If you have already created lot of pages, you will have to first disable them. This is what I did for my site.

mysql> update wp_posts set ping_status='closed',comment_status='closed' where post_type in ('post','page');
Query OK, 36 rows affected (0.00 sec)
Rows matched: 55 Changed: 36 Warnings: 0

Now we should set the default value for these settings to closed.

mysql> alter table wp_posts alter column ping_status set default 'closed';
Query OK, 0 rows affected (0.21 sec)
Records: 0 Duplicates: 0 Warnings: 0

mysql> alter table wp_posts alter column comment_status set default 'closed';
Query OK, 0 rows affected (0.00 sec)
Records: 0 Duplicates: 0 Warnings: 0

This alone will not help to disable comments/pings because the editor to create page/post by default will have the options to allow comments/pings as enabled. To change it

Go to: Settings -> Discussion -> Default article settings and clear all settings

You are all set. Comments will be disable in your web site now.

No comments:

Post a Comment