• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

Submit your local news to MyCapeTown HERE

  • WordPress
  • Facebook
  • Twitter
  • Instagram
  • LinkedIn
  • YouTube
  • Bluesky
My Cape Town

My Cape Town

Cape Town Community News and Events

  • Events
  • Daily News
  • Submit News
  • Dam Levels
  • Stratlec Shop
You are here: Home / MyPR / MySQL Command To Delete Only Certain WordPress Post Types via phpMyAdmin

MySQL Command To Delete Only Certain WordPress Post Types via phpMyAdmin

21 June 2025 by Con Tributor

Here I am using posts created by the WP RSS Aggregator as an example.

This WordPress Plugin will Import and display RSS feeds anywhere on your site. Once you have set up any RSS feed you sit back and let Aggregator do the rest automatically as it creates a constant flow of fresh content to keep your audience engaged.

And, therein lies the rub, sometimes it runs and posts content that could harm your site or make it difficult for search engines to categorise just what your site is about.

AND then you sit with a situation where you will have thousands of posts to delete from your site.

Now the ‘traditional’ way to do so is to go to your WP Admin, select posts by post type and then delete 200 at a time.

You can select more than 200 but that could lead to processing hiccups and when you are trying to delete around 80 000 posts it can take a while.

The quickest way to mass delete posts is to use a MySQL operation on your posts.

You can:

  1. Select 500 posts at a time and delete OR
  2. You can write a MySQL command to do so

In my case I had a post type (wprss_feed_item) to help uniquely identify the posts I wanted to delete, my table name was a9_posts so the code was relatively simple:

DELETE FROM `a9_posts` WHERE `a9_posts`.`post_type` = ‘wprss_feed_item’;

Want to know how to get to the MySQL section of your web hosting?

  1. Go onto your web site hosting control panel.
  2. Look for a phpMyAdmin link and sign in
  3. Look for your ‘posts’ table and click on it
  4. The BROWSE tab will open
  5. SELECT the SQL Tab, drop the above code in and press Go

VERY NB: The above method is NOT reversible so if you are not sure then please save a backup of your table BEFORE running the command. To do so you click on the EXPORT tab when you are viewing your POSTS. If you make a boo boo then you can IMPORT your saved file to restore everything.

If all else fails Contact Me for assistance (which is a polite way of saying that you will be charged!).

DON’T FORGET: If you are deleting WPRSS created content you will also need to scroll down to the table named wprss_logs and delete that content as well.

You can more easily delete that content by:

  1. Clicking on the wprss_logs table
  2. Clicking on the OPERATIONS Tab
  3. Scrolling down to the ‘Delete data or table’ option and ‘Empty the table’ if you intent keeping WPRSS running or ‘Delete the table’ if you no longer require WPRSS Aggregator.
What phpMyAdmin looks like for a WordPress Site. Photo: MyPR

Video: MySQL Command To Delete Only Certain WordPress Post Types via phpMyAdmin

CLICK HERE to submit your press release to MyPR.co.za.

Visit MyPR.co.za

Category: MyPRTag: MyPR

you may also love

MyPR

Transform Any Room With Tailored Wallpapers from Window Art

Cape Town & Gauteng, South Africa — One of the most effective ways to transform your interior space is by incorporating …
News

Firdous Osman joins Boomtown as MD

The World Women Leadership Congress’s Global Woman Leader in 2023, South Africa’s Women Leader in 2021 and Africa’s Women …

Paarl set to kickstart the action of the 2021 PUMA School of Speed!

Boasting three events in 2021 the action of South Africa’s most exhilarating schools’ athletics meeting, the PUMA School of …
MyPR

The 10th Edition of the Tiger’s Milk Winter Classic at Muizenberg This Weekend.

The 10th Edition Of The Tiger’s Milk Winter Classic At Muizenberg This Weekend. Muizenberg Surfers Corner, Cape …

About Con Tributor

A catch all for the many contributors to My Cape Town – thank you for submitting your Cape Town news HERE.

Previous Post:MyPRNatural Birth vs C-Section: Understanding Your Options
Next Post:Eggcelent idea for breakfastNews

Copyright © 2026 · My Cape Town · All Rights Reserved · Powered by Reach Trust