How to manually delete all pending posts in WordPress?

Imagine, you are running a WordPress site with an article/news submission form. Over the period of time, many SPAM posts will accumulate under the header “Pending” and consumes a huge database space. You will be able to view the total number of posts if you login to dashboard.

You have to delete all unncecessary pending posts regularly and can be done either using a plugin like Bulk Delete or manyally from PHPMyAdmin.

You can make use of Bulk Delete WordPress plugin if the total number of pending posts is less than 50. If there are more than 100 pending posts, it is better to make use of SQL Commands from within PHPMyAdmin.

1) Login to PHPMyAdmin

2) Select your database

3) Run the following SQL command by clicking the query window

DELETE FROM wp_posts WHERE post_status = "pending";

The above command will delete all your unwanted pending posts within 20 seconds. Please make sure to backup your existing MySQL database before running the above command.

NOTE: PHPMyAdmin can be accessed from Database Manager section in HELM Control Panel (Windows Server) and inside CPanel (Linux Servers)


Leave a Comment