Today I was going through the logs of of this Blog and found people are not only coming here in search of removing author URL in comments but also we are getting traffic for disabling wordpress comments. I do know this is a pretty simple question with a quite simple answer yet for those who don’t know and what to configure their wordpress installation with no comments here is the solution.
Through WP Admin Dashboard (Novice):
Next you’ll disable the comments for your new articles.
So now you have disabled comments on any of your future posts, now lets disable them for all previous posts. Move to the “All Post” tab under Posts and check the top most check-box button to select all posts, select Edit from the top and hit apply. Change the Comments status to “Do not Allow” and repeat the same steps for any required post or all the left pages.
So lets repeat all the required steps.
- Go to the admin dashboard.
- Select Discussion Tab from Settings.
- Update comments status check-box to disable comments.
- Select All posts from Post.
- Select all of them by checking the topmost check-box.
- Select Edit from the drop down menu at the top and hit apply.
- Update the comment status to your desired option.
Through PHPMyAdmin (Expert):
This requires access to the bare database of your wordpress installation and the wordpress version to be at least 2.5 or beyond.
- Log into your PHPMyAdmin.
- Select your wordpress database from the left menu.
- Switch to the SQL tab from the right top bar.
- Within the SQL Query Box copy and past:
PgSQL12UPDATE PREFIX_posts SET comment_status = 'closed',ping_status = 'closed' WHERE comment_status = 'open';
- Error? Please make sure that your wordpress database prefix matched your table prefix in query box.
- Successful? There you go.
- To enable comments once again, use the following query:
PgSQL12UPDATE PREFIX_posts SET comment_status = 'open',ping_status = 'open' WHERE comment_status = 'closed';
Remove Comments Are Closed:
So now you have disabled you blog comments and are seeing an ugly message under each blog post and space where comments were previously present, Comments are closed. Comments for this entry are closed and blah blah. Lets remove them too.
Proceed to the Theme Editor from Appearance menu:
Next you have to select the comments.php file of your theme as mentioned in the next screen:
The editor will now open the comments.php file into editor window, you need to search for strings matching this code:
<?php if ($comments) : ?>
/* some code to render comments and appropriate css */
<?php else : /* this is displayed if there are no comments so far */ ?>
<!-- If comments are open, but there are no comments. -->
<!-- If comments are closed. -->
<?php endif; ?>
<?php endif; ?>
Remove the strings inside <p></p> tags if any like are having here at line: 8 and the Comments are closed string will be removed from your blog globally.
Any problems you are facing or don’t want mess with the php code yourself? use our contact form to hit me and I’ll do the job for you, happy blogging on WordPress.