Quickie – Disable WordPress Comments Temporarily

Very handy if you’re moving a WordPress blog during DNS  propagation time. This is best suited to remove the ability to comment on their blog without changing the comment status of posts in their database. See the alternative SQL method to turn off comments and pingbacks on a WP blog in hosting transition here.

From http://www.theblog.ca/wordpress-temporarily-disable-comments:

1) Turn off the display of the comment form in your Comments file in your template. To do this, go to “Presentation… Theme Editor…” then edit the Comments file.

You’ll see something like this.

<?php if ('open' == $post->comment_status) : ?>
 <h3 id="respond">Leave a Reply</h3>

Replace it with something like this:

<?php // if ('open' == $post->comment_status) : ?>
 <p>Comments are temporarily disabled</p>

Note: I see no need for the author’s suggestion of renaming the wp-comments-post.php file because we don’t need to worry about the spam comments accumulating during a hosting move.

Share Button

One thought on “Quickie – Disable WordPress Comments Temporarily”

Leave a Reply

Your email address will not be published. Required fields are marked *