Beginner's Guide for WordPress - Start your WordPress Blog in minutes.
Choosing the Best
WordPress Hosting
How to Easily
Install WordPress
Recommended
WordPress Plugins
View all Guides

How to Allow Users to Edit their Comments in WordPress

Last updated on by
Follow WPBeginner on YouTube
How to Allow Users to Edit their Comments in WordPress

How many times you have felt the need to edit a comment you just left on a site? Maybe you want to correct a spelling or grammar error, or maybe you just regret saying something silly. It happens to all of us. Except most sites do not allow users to edit their comments once it is published. If you run an active site with a lot of comments, then you may have considered allowing users to edit their own comments. In this article, we will show you how to allow users to edit their comments in WordPress for a short period of time.

Video Tutorial:

)

If you don’t like watching the video, then continue reading.

If your site has registered users, then you can easily leverage the built-in user roles and capabilities to allow some users the ability to edit their own comments. The problem is that most sites do not require users to register before commenting. By default WordPress sites have open comments for anyone who provides a name and email. So here is how you can allow non-registered users to edit their own comments for a short period of time (default is 5 minutes).

First thing you need to do is install and activate the Simple Comment Editing plugin. Upon activation the plugin allows anonymous users the ability to edit their comments after sending it.

Allowing anonymous users to edit their comments in WordPress

By default the user can only edit their comments for the first 5 minutes. After that, the user is not able to edit their comment. If you want to change this time period, then this plugin allows you to do so using a filter. Simply add the following code in your theme’s functions.php file or in a site-specific plugin like this:

add_filter( 'sce_comment_time', 'edit_sce_comment_time' );
function edit_sce_comment_time( $time_in_minutes ) {
    return 10;
}

In this code above, we have simply increased the time limit set by the plugin to 10 minutes however you can modify it to anything else that you like. Since the purpose is to allow users to fix small grammatical errors or taking back something right away, in our opinion it is best to not to set the limit higher than 30 minutes.

Simple Comment Edits is a stripped down version of Ajax Edit Comments to make it easy for new users to get started and going without dealing with any settings. This plugin works out of the box. If you don’t want to modify the default time limit, then there is no settings you need to fiddle with. We love plugins like this that are plug and play.

We hope that this article helped in allowing anonymous users to edit their own comments in WordPress for a short period of time. What do you think about this feature? Is it useful? Would you put it on your site? Let us know by leaving a comment below.


Editorial Staff at WPBeginner is a team of WordPress lovers led by Syed Balkhi. Page maintained by Syed Balkhi.

WPBeginner's Video Icon
Our HD-Quality tutorial videos for WordPress Beginners will teach you how to use WordPress to create and manage your own website in about an hour. Get started now »
  • Ryan Hellyer

    I love this plugin and use it on all of my websites.

  • Nathan

    This is just what i’m looking for. Thanks!

  • Loren Wolf

    Does this plugin work on a free blog?

    • http://www.wpbeginner.com/ WPBeginner Support

      It works on self-hosted WordPress sites.

  • Srihari Thalla

    Does this plugin works with Disqus Commenting System?

    • http://www.wpbeginner.com/ WPBeginner Support

      No it does not.