AutomationFlowsContent & Video › Automatically Archive Old Wordpress Posts to Draft Status

Automatically Archive Old Wordpress Posts to Draft Status

ByDavid Olusola @dae221 on n8n.io

This workflow is designed to maintain your blog's health and SEO by automatically moving old, published posts into a "draft" or "archive" state. This prevents outdated or low-traffic content from negatively impacting your site's performance and allows you to easily review and…

Cron / scheduled trigger★★★★☆ complexity7 nodesWordPressEmail Send
Content & Video Trigger: Cron / scheduled Nodes: 7 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #7418 — we link there as the canonical source.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "nodes": [
    {
      "id": "48e4e6d7-f1c4-4539-a1c7-9d5fd4aed1eb",
      "name": "Quarterly Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -304,
        96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 0 1 */3 *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "acc3caae-a2f2-47ee-90fe-d9d6cc908cde",
      "name": "Find Old Posts",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        -48,
        96
      ],
      "parameters": {
        "options": {
          "order": "asc",
          "before": "{{ $now.minus({ months: 12 }).toISO() }}",
          "status": "publish"
        },
        "operation": "getAll"
      },
      "typeVersion": 1
    },
    {
      "id": "4d37e32a-8a0c-4881-9898-871252d5ac45",
      "name": "Check if Posts Found",
      "type": "n8n-nodes-base.if",
      "position": [
        208,
        96
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 1,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "6516d0df-79fc-4895-b422-1aaf6e348fc8",
              "operator": {
                "type": "number",
                "operation": "gt"
              },
              "leftValue": "={{ $json.length }}",
              "rightValue": 0
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "9d23ec40-bb26-4aa4-b960-fde58c5247f6",
      "name": "Archive Post",
      "type": "n8n-nodes-base.wordpress",
      "position": [
        464,
        32
      ],
      "parameters": {
        "postId": "={{ $json.id }}",
        "operation": "update",
        "updateFields": {
          "tags": "archived,old-content",
          "status": "draft"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "4d4a6928-521e-4cda-b7ee-66641e34838f",
      "name": "Send Notification",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        720,
        32
      ],
      "parameters": {
        "options": {},
        "subject": "Quarterly Archive Complete"
      },
      "credentials": {
        "smtp": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "6b526fe7-645a-4cb5-bb5b-4e0c31d84142",
      "name": "Log No Posts",
      "type": "n8n-nodes-base.noOp",
      "position": [
        448,
        208
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "e9a2e951-43e5-4e98-83d4-3145dc6dbf47",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -576,
        -80
      ],
      "parameters": {
        "width": 380,
        "height": 780,
        "content": "## Workflow Overview\n\n**Author: David Olusola**\nThis workflow automatically archives old WordPress posts every quarter.\n\n**Schedule:** Runs on the 1st day of every 3rd month (quarterly)\n\n**Steps:**\n1. Trigger executes quarterly\n2. Finds old posts from WordPress\n3. Archives the identified posts\n\n---\n\n## Need n8n Coaching?\n\n\ud83c\udfaf **Get Professional Help:**\n- Workflow optimization\n- Advanced automation strategies\n- Custom node development\n- Error handling & debugging\n- Performance improvements\n\n\ud83d\udce7 [Contact for n8n coaching and consultation services!](mailto:david@daexai.com)\n\n---\n\n\ud83d\udca1 **Tips:**\n- Add filters to \"Find Old Posts\" to specify criteria\n- Consider adding error handling nodes\n- Test with a smaller batch first"
      },
      "typeVersion": 1
    }
  ],
  "connections": {
    "Archive Post": {
      "main": [
        [
          {
            "node": "Send Notification",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Old Posts": {
      "main": [
        [
          {
            "node": "Check if Posts Found",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Quarterly Trigger": {
      "main": [
        [
          {
            "node": "Find Old Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check if Posts Found": {
      "main": [
        [
          {
            "node": "Archive Post",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Log No Posts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

This workflow is designed to maintain your blog's health and SEO by automatically moving old, published posts into a "draft" or "archive" state. This prevents outdated or low-traffic content from negatively impacting your site's performance and allows you to easily review and…

Source: https://n8n.io/workflows/7418/ — original creator credit. Request a take-down →

More Content & Video workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Content & Video

Automates gold market tracking using AI forecasting by collecting live prices, financial news, and macro indicators (inflation, interest rates, employment) to produce real-time insights and trend pred

HTTP Request, Agent, WordPress +3
Content & Video

This workflow contains community nodes that are only compatible with the self-hosted version of n8n.

HTTP Request, Item Lists, OpenAI +3
Content & Video

Youtube Instalation Instructions

WordPress, HTTP Request, YouTube
Content & Video

Wordpress Filter. Uses wordpress, httpRequest, airtable, markdown. Scheduled trigger; 13 nodes.

WordPress, HTTP Request, Airtable
Content & Video

2281. Uses wordpress, httpRequest, airtable. Scheduled trigger; 13 nodes.

WordPress, HTTP Request, Airtable