Fixing Pending Comments Not Showing (invisible) in WordPress

Without any Doubt, WordPress is a great Solution for Newbie bloggers. However, Occasionally, you will encounter errors & Problems. Don’t panic, it happens with everybody. As you are new to WordPress, you are prone to mistakes. With time you will gain expertise. In this Article, I am providing you a solution to a problem related to Pending Comments Visibility (Not showing) in WordPress.

Fixing Pending Comments Not Showing Problem in WordPress

As you know, All Comments on your WordPress Website Should be moderated first before they are publically visible. All Comments which are not yet approved are shown in the “Pending” Section. Recently, I encountered a mind-boggling problem related to Pending Comments Visibility in WordPress.

It Started after I migrated one of the client’s website to a new hosting. Everything seemed fine until my client informed me about a weird problem. He told me that there are pending comments on his website but clicking on “Pending” Shows “No Comments Found”. To check this out, I logged into his WordPress Dashboard and clicked on  “Comments”. There I could clearly see that 87 comments are pending. I Clicked on “Pending”  and there was not even a single comment there. I posted a test comment on the website and the number increased to 88 but still, Pending comments were not visible.

At this time, I had no idea what went wrong? Was it due to recent migration? or was it due to any plugin? I was totally confused. I asked my client if he had made any changes recently? He told me that he had touched nothing.

Here are a few things that I tried initially :

Disabled all the Plugins: I disabled all active plugins on the Website but the problem was still there. So, this clearly indicated that this issue has nothing to do with Plugins.

Database Optimization: I used “WP-Optimize” Plugin to optimize the Database but the problem still remained.

After the above-mentioned methods didn’t work, I desperately searched for a solution on Google. Then I came through an article that explained that this could be due to a misconfiguration in the “Comments” table of the Website’s Database. As you know, complete data like WordPress Posts, Comments, etc. are saved in the Database. So, I logged into the Cpanel and Opened up “phpmyadmin”.Then, I navigated to the “Comments” Table.

Whenever Somebody types in a comment on your website, every piece of information are saved in the database (specifically in the “comments” table). This table has columns like “Comment ID, Comment_Author, Comment_author_email, Comment_author_ip, Comment_Author_Date, Comment_Content etc.). In order to Commenting system work properly, it is made sure that Every Comment has a unique ID i.e. Comment_ID. This is ensured by applying Primary Key Constraint. Also, Comment_ID should use Auto_Increment Attribute.

When I looked into the table, I came to know that Auto_Increment attribute was not enabled. I tried to enable it but it gave an Error. So, I Did this:

In the “comment_id” column, I deleted all entries with value “0”. After this, I enabled the auto_increment attribute and it worked this time.

Note: Deleting the Entries with “0” Value in Comment_ID Section will delete all the comments in the “Pending” Section.

Now, to ensure that everything works fine now, I wrote a  test comment. Then, I logged into the WordPress Admin Panel and Opened up the comments Section. I clicked on “Pending” & Voila!, I could see the Pending comments now.

Wordpress Pending Comments Visible Now


I have been informed that in some cases, Even After Deleting the “0” values in the Comment_ID section, the auto-increment feature is not working. To Fix this, I advise you to run this query in the “SQL Command” section:

ALTER TABLE `Table_Name` ADD INDEX(`comment_ID`);

SQl Add Index Code

Once this is executed, enable the auto-increment feature.

Steps to Fix WordPress Comments Not Visible Problem

If the above-mentioned steps are still not clear, here is what you need to do :

✅Login into your Hosting Cpanel Account

✅Once Logged in, Go to “phpmyadmin” section

Hosting Cpanel Dashboard, Click on "phpmyadmin"

✅Then, click on your Database Name

phpmyadmin databases list

✅Now, Locate Table called “Comments” ( This table name will usually precede with a prefix like “wp_”). In this case, the table name is “wp_comments”. Click on the table name

wp_comments table

Click on the “Structure” Link

✅Now Click on “Change” Corresponding to “Comment_ID” Column Name

✅Check the “A_I” i.e. Autoincrement and click on save

enable auto increment in comment_id column

Note: Also Ensure that Comment_ID is the Primary Key of the table. If you see a colored Key() corresponding to this column name, this means it is the primary key.

If you see an error while applying Auto_increment attribute on comment_id column, run this command first:

ALTER TABLE `Table_Name` ADD INDEX(`comment_ID`);

After this command is executed, you can retry.

I Hope that Pending Comments Not Visible issue is now resolved. I would love to know your feedback, suggestions. If you are still experiencing any problem, feel free to write down your concern below in the comments section.


  • Hey mate,

    I am having the same problem, I was not able to locate where I was making a mistake. now I know where I have to make changes.

    I am not able to run this command ALTER TABLE `Table_Name` ADD INDEX(`comment_ID`);

    (i have changed the table name).

    can you let me know where I am making a mistake

Leave a Reply

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