How to unpublish posts automatically in EmDash

Auto Unpublish Posts overview. Install it free from the EmDash plugin registry.

Some content has an end date: an event page, a sale, a job opening, a temporary notice. If nobody takes them down, visitors and search engines keep finding them.

This guide shows how to make those changes happen on schedule in EmDash.

What EmDash does on its own

EmDash 1.0 can schedule an entry to publish at a future time. You set the date in the entry’s publish options, and EmDash publishes it when the time comes.

There is no matching setting to unpublish an entry later. You can unpublish or trash an entry by hand at any time. For a few entries, a calendar reminder and a manual unpublish work fine.

Manual removal gets harder with many end dates, or several people publishing. That is where a plugin helps.

Requirements

To schedule removals automatically, you can use Auto Unpublish Posts. Peachfin Themes makes Auto Unpublish Posts.

You need:

  • EmDash 1.0 or later with a plugin sandbox runner. On Cloudflare, that means the Workers Paid plan and a Worker Loader binding.
  • An email provider in EmDash, if you want run emails. Changes run without one.

The plugin makes no network requests. Emails go through your site’s own email provider.

Install the plugin

  1. Open the registry listing and select Open in EmDash, then enter your site’s address. You can also find Auto Unpublish Posts in the plugin registry inside your EmDash admin.
  2. Review the requested permissions and confirm.
  3. Open the plugin’s Settings page as an administrator.
  4. Set the site time zone.
  5. Choose who gets run emails, and send yourself a test email.

Schedule a change for one entry

  1. Open any saved entry.
  2. In the sidebar, find the Scheduled changes panel.
  3. Pick an action: unpublish, move to trash, or add, remove or replace terms.
  4. Pick a date and a time.
  5. Confirm to schedule.

The same panel shows the entry’s pending changes and latest runs. You can cancel a change there, or run it now.

If the entry also has a pending scheduled publication, unpublishing cancels that publication first.

Remove every new entry after a set time

For content with a fixed lifetime, set a collection default instead of scheduling each entry.

  1. Open Defaults.
  2. Choose a collection.
  3. Set the change, such as unpublish 30 days after publishing.
  4. Save.

From then on, publishing an entry in that collection schedules the change automatically.

Check what is coming up

Open Scheduled changes. It lists upcoming changes and the run log. Free shows the last 50 runs. You can cancel or run a change from this page too.

Every run, skip and failure is logged with a reason. If an entry was deleted before its change ran, the change is skipped and the log says why.

Two more Free features help with removals:

  • Pages due to be removed get robots: unavailable_after, which tells search engines when the page will go away.
  • A dashboard widget shows what is coming up.

Who can do what

  • Authors schedule changes to their own entries. They can cancel or run only the changes they scheduled.
  • Editors manage changes on any entry, and use the Scheduled changes page.
  • Administrators also manage settings, defaults, rules, the license and redirects.

The plugin checks these roles on the server for every request.

What Pro adds

Pro is in the same package. A yearly license key unlocks it. Licenses cost $49 a year for 1 site, $99 for 5 sites and $149 for unlimited sites.

Pro adds:

  • Rules that run on publish, on save, at a date stored in the entry, or daily, weekly or monthly. A rule can have up to 3 conditions (term, status, field value, age, author) and up to 3 steps, each with an optional condition and “otherwise”.
  • More actions: set a field, unpublish and redirect (301, 302 or 410), and send an email.
  • Bulk scheduling of up to 2,000 entries by collection, status, term and age.
  • CSV import of up to 300 rows, and CSV export of the log and the schedule.
  • The full log with paging and an outcome filter.
  • More agent tools: batches of 100 changes, the run log and rules.

To turn it on:

  1. Buy a license on the store page.
  2. Enter your site’s domain on the order page, or under My account → EmDash licenses, to get your key.
  3. Paste the key under Settings → Auto Unpublish Posts Pro and save.

The key is checked offline. It works on the domains it was issued for and their subdomains. It always works on localhost, *.localhost and *.test.

Limits and things to know

  • Each change is an EmDash scheduled task due at the time you set. It is claimed before it runs, so it runs once.
  • A temporary failure is retried after 5 and 10 minutes. After the third failed attempt, the change is marked failed and logged.
  • An hourly sweep re-arms overdue changes whose task was lost.
  • “Set a field” does not publish other unpublished edits. If the entry has some, the new value waits in the draft, and the log says so.
  • The plugin changes only redirects it created. If another redirect exists for the address, the change fails.
  • The plugin’s own publishes never trigger its rules or defaults.
  • The log keeps 180 days. Finished changes are removed after 90 days.
  • When a license expires, existing rules, defaults and scheduled changes keep running. Only creating and editing Pro features stops.

FAQ

Can I schedule changes from an AI agent?

Yes. EmDash’s MCP server at /_emdash/api/mcp lists the plugin’s tools. In Free they list, schedule and cancel changes, and set collection defaults. Each tool checks the user’s role, like the admin does.

What happens if a change fails?

It is retried after 5 and 10 minutes. After the third failed attempt it is marked failed, logged with the reason, and emailed if notifications are on.

Does the plugin send my content anywhere?

No. It declares no allowed hosts and checks the license key offline.

How do I renew Pro?

Use Renew on your license under My account → EmDash licenses. It extends the same license by a year and gives you a new key to paste in Settings.