Once in a while some of my WordPress website customers need a way to automatically unpublish some specific posts. For example – if they run a competition, they need to disable it’s announcement automatically after the competition ends.
If you need to unpublish a post or two in a year you can easily do it manually – just delete a post, or switch it to a draft. But if you need to do it more often, it’s much better to set expiration date, and let WordPress page or post expire automatically when the right time comes.
WordPress does not have ability to set posts to expire. Bet there is a free and simple to use plugin that does just that. Here you’ll learn how to set WordPress post or page to expire on certain date.
How to automatically unpublish WordPress post or page after specific date or time
First step you need to do if you want to set any post or page to expire automatically – go to Plugins >> Add New, and search for plugin named PublishPress Future. Once you find it, click Install Now.
Once you install and activate the plugin you can go straight to post or page you want to automatically expire. Look for PublishPress Future tab in post settings, and check Enable Post Expiration checkbox.
Once you do that you’ll see all the settings you need. You can set post expiration date and time, and set what needs to happen after it expires:
- Switch expired post to Draft
- Delete post after expiration date
- Move expired post or page to Trash
- Set post as Sticky after selected date and time
- Unstick post after selected date
- Move expired post from one category to another, or remove it from one of the categories
That’s it – you can set it and forget it. Post or page in your WordPress website will expire automatically.
More post expiration settings
If you want more features or even more automation for the posts that need to expire, this plugin has even more to offer. Go to Future in WordPress admin panel, and here you’ll be able to customize expiration plugin.
Here’s what you can do:
- set default Expiration category
- Get notifications to any email once the post expires
- Show message like “Post expires at EXPIRATIONTIME on EXPIRATIONDATE” at the bottom of the post
- Set up expiration defaults so your website editors won’t need to mess with expiration settings all the time
- Limit which user roles can use the Post Expiration plugin (for example only Administrators, Editors etc.) in your WordPress website.