Batch Delete Posts and Featured Images in WordPress — n8n Workflow

Medium complexity Trigger8 nodes🏷️ Miscellaneous👁 37 viewsby Eric

Overview

Why use this You need to delete (many) posts on a WordPress website and also delete the featured image associated with each post.

Hours of rote work cut into a fraction with this automation.

How it works set your wordpress URL in the manual trigger node set your WP post search parameters (WP API returns 10 posts by default; you could also set up pagination for scaling this automation beyond 10 posts per execution) decide (and build) your filter/approval process

What you can expect this automa

Nodes used

HTTP Request

Workflow Preview

Approvals
Built out your approval process here.
Either use this workflow as a manually-driven time save
Router
This step detects if the post has a featured image asso
This is the Magic
If the post has a featured media associated, the workfl
If it has no media associated, then the workflow simply
Trigger
This workflow is set up for bulk/batch deletion of many
It has been pre-loaded with the property `wpUrl` set to
Get Your Posts
IMPORTANT: Be sure to add your authentication for WordP
This request will return all `pending` status posts, or
Expansion
You might consider storing the results of the deleted p
delete img
get img
get post
delete post
F
Filter
H
Has Img
delete post with img
C
Change your Domain here
8 nodes7 edges

How it Works

  1. 1

    Trigger

    The workflow starts with a trigger trigger.

  2. 2

    Process

    Data flows through 8 nodes, connecting filter, httprequest, if.

  3. 3

    Output

    The workflow completes its automation and delivers the result to the configured destination.

Node Details (8)

HT

HTTP Request

httpRequest

#1

How to Import This Workflow

  1. 1Click Download JSON button on the right to save the workflow file.
  2. 2Open your n8n instance. Go to Workflows → New → Import from file.
  3. 3Select the downloaded batch-delete-posts-and-featured-images-in-wordpress file and click Import.
  4. 4Set up credentials for each service node (API keys, OAuth, etc.).
  5. 5Click Test Workflow to verify everything works, then activate it.

Or paste directly in n8n → Import from JSON:

{ "name": "Batch Delete Posts and Featured Images in WordPress", "nodes": [...], ...}

Integrations

filterhttprequestifmanualtrigger

Get This Workflow

Download and import in one click

Download JSONView on n8n.io
Nodes8
Complexitymedium
Triggertrigger
Views37

Created by

Eric

Eric

@automation-wizard

Tags

filterhttprequestifmanualtrigger

New to n8n?

n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.

Get n8n Free →

Related Miscellaneous Workflows