• 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

What Your Cholesterol Numbers Really Mean

Affinity Health, a leading provider of high-quality health cover, is helping people understand what the numbers on a …
News

Totalsports Women’s Race Cape Town and The Gigantic Walk unite for 2023

The Totalsports Women’s Race organizers are thrilled to collaborate with the Department of Cultural Affairs and Sport, in …
MyPR

A Complete Guide to Selecting the Best Lash Extension Kit for Your Needs

Lash extensions have become increasingly popular in recent years, as they can enhance the appearance of natural lashes and …
MyPR

How to Teach Your Children Disrespect for Everyone (Including God)

Dear Churches – Stop inviting Satan into your home Dear Parents – Your children are lost and need YOU Dear Schools – Teaching …

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