How to manually delete all pending posts in WordPress?


0

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)


Like it? Share with your friends!

0

What's Your Reaction?

hate hate
0
hate
confused confused
0
confused
fail fail
0
fail
fun fun
0
fun
geeky geeky
0
geeky
love love
0
love
lol lol
0
lol
omg omg
0
omg
win win
0
win
Anand Narayanaswamy
Anand Narayanaswamy is the editor-in-chief of Learnxpress. He was a Microsoft Most Valuable Professional (MVP) for a period of 9 years. He is a ASPInsider based in Trivandrum, Kerala State, India. Anand is the author of Community Server Quickly published by Packt Publishing.

2 Comments

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