Linux 软件免费装
Banner图

MSC Post Expiry

开发者 djm56
更新时间 2026年8月27日 22:43
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPL-2.0+
版权网址: 版权信息

标签

expire posts unpublish content expiration post expiration redirect expired posts

下载

1.7.0 1.7.1 1.5.2 1.5.1

详情介绍:

Set an expiration date on any post or page and MSC Post Expiry handles the rest — automatically. When the date arrives, choose what happens: move to trash, permanently delete, revert to draft, make private, move to a different category, or keep the post live and redirect visitors. Perfect for limited-time offers, event announcements, job listings, seasonal content and legal notices that must come down on time. Features: Use Cases: The plugin adds a "Post Expiry" panel to the block editor sidebar and a metabox in the classic editor where you can set the expiration date and time. Once the scheduled time passes, the plugin automatically processes the post according to your configured settings.

安装:

  1. Upload the plugin to /wp-content/plugins/.
  2. Activate in the WordPress plugins screen.
  3. Go to Settings > MSC Post Expiry to configure the plugin.
  4. When editing a post or page, use the "Post Expiry" panel to set expiration dates.

屏幕截图:

  • SEO handling for expired posts — add noindex/nofollow, set a canonical URL, and return a 410 Gone status so search engines drop expired content cleanly.
  • Smart Expiry Rules — build conditional rules by category, tag, author, post age, comment count, view count or custom field, evaluated in priority order.
  • Expiry action history — a log of recent automatic expiry actions with the post, action taken, and date.

升级注意事项:

1.7.1 Compatibility update: confirmed tested against WordPress 7.1. No functional changes — safe update. 1.6.0 Important fix: Smart Rules created in the admin now actually run, with working priorities. Single consolidated expiry pipeline — all features apply on the 5-minute check. Recommended for all users. 1.5.2 Compatibility update: confirmed tested against WordPress 7.0.2. No functional changes — safe update. 1.5.1 SQL security update: All analytics database queries refactored to use fully-static SQL templates with toggle-pattern conditions. Recommended update for WordPress.org compliance. 1.5.0 Important bug fixes: duplicate metabox in block editor, data consistency between classic and block editor, timezone display, and deprecated function replacements. Recommended update for all users. 1.4.1 Security and maintainability update: improved settings input sanitization and moved inline admin assets to scoped external files. 1.4.0 Class files renamed for consistent naming. No functional changes — safe update. 1.3.0 Complete translation update: all 189 translatable strings now translated across 12 locales. POT template regenerated. 1.2.1 Removed workflows feature, renamed rules to Smart Expiry Rules, added PHPUnit test suite, updated documentation. 1.2.0 Major feature release: per-post actions, redirects, smart expiry rules, bulk scheduling, email notifications, SEO handling, analytics dashboard, and block editor support. All features included free. 1.1.0 New features: "Change to Private" and "Move to Category" expiry actions. Critical bug fixes for time-based expiry and logging. 1.0.0 Initial release of MSC Post Expiry. Schedule automatic expiration for your posts and pages.

常见问题:

How do I make a WordPress post expire automatically?

When editing a post or page, look for the "Post Expiry" panel in the block editor sidebar (or the metabox in the classic editor). Enter the date and time when you want the post to expire — the plugin takes care of the rest via WordPress cron.

How do I automatically unpublish a post on a specific date?

Set an expiry date and choose the "Change to Draft" or "Change to Private" action — the post is unpublished automatically when the date passes, without deleting it. This is the simplest way to handle time-limited content expiration and scheduled unpublishing in WordPress.

What happens when a post expires?

The plugin performs one of six actions based on your settings:

  • Move to Trash - The post is moved to trash and no longer visible to visitors
  • Permanently Delete - The post is permanently deleted from your site
  • Change to Draft - The post is changed to draft status and hidden from visitors
  • Change to Private - The post is changed to private status
  • Move to Category - The post is moved to a selected category
  • Redirect Only - The post stays published but visitors are redirected to a specified URL

Can I redirect an expired post instead of deleting it?

Yes. Choose the "Redirect Only" action (or a Smart Rule with a redirect action), enable redirects in Settings, and expired posts will send visitors to the URL you set — great for pointing old offers at your current landing page. The SEO tab can additionally set a canonical URL for expired content.

Does it work with the block editor (Gutenberg) and the classic editor?

Yes, both. The block editor gets a "Post Expiry" sidebar panel; the classic editor gets a metabox with date and time fields.

Can I get an email before a post expires?

Yes. Enable email notifications in Settings. You can notify the post author, the site admin, or both, between 1 and 30 days before expiry. Each post triggers one reminder.

What are Smart Expiry Rules?

Smart Rules let expiry behaviour depend on the post itself. For example: "If a post is in the News category, move it to draft when it expires" or "If a post is older than 90 days, delete it permanently." Conditions include category, tag, author, post age, comment count, view count and custom fields. Rules run in priority order (lower number wins) and the first matching rule overrides the default action.

Can each post have its own expiry action?

Yes. In the "Post Expiry" panel (block editor sidebar or classic metabox) you can override the action for that single post — including a redirect URL or a target category — which takes precedence over the global default. You can also vary the action automatically with Smart Rules (by category, tag, author, age and more).

How does the SEO handling work?

When a post expires, the plugin can automatically add noindex/nofollow meta tags, set a canonical URL (to home or category), and return a 410 Gone status code so search engines drop the page cleanly. Configure these in the SEO tab.

How often are expired posts checked? Is WP-Cron reliable?

Expired posts are checked every 5 minutes via WordPress cron. Note that WP-Cron runs on site traffic — on very low-traffic sites a scheduled task can run late. For exact timing, point a real cron job at wp-cron.php (your host's docs explain how) — the plugin then processes precisely on schedule.

Can I expire many posts at once?

Yes. Select posts in the Posts list and choose the "Set expiry using default window" bulk action — each selected post gets an expiry date of now plus your configured default window (Settings → Bulk Scheduling, 1–3650 days).

Does this plugin work with custom post types?

Yes. Configure any public post types in Settings, in include or exclude mode.

Is there a way to check if a post is expired in my theme?

Yes, developers can use the helper functions:

  • mscpe_is_post_expired( $post_id ) - Check if a post is expired
  • mscpe_get_expiry_datetime( $post_id ) - Get the expiry date and time
  • mscpe_get_expiry_status( $post_id ) - Get human-readable expiry status
  • mscpe_format_expiry_datetime( $date, $time ) - Format expiry date for display

Does it send data anywhere? Is it GDPR-friendly?

No data leaves your site. There are no external services, no CDN assets (Chart.js is bundled locally), and no tracking. Optional expiry-reminder emails are sent through your own WordPress mail.

What data is removed on uninstall?

Uninstalling deletes all plugin options, rules, the action log, the analytics table, and all expiry post meta. Log files under wp-content/uploads/msc-post-expiry-logs/ can be removed manually.

What languages are supported?

The plugin includes translations for 12 languages: German (Germany and Switzerland), Spanish (Spain and Mexico), French (France and Canada), Italian, Japanese, Dutch (Netherlands and Belgium), and Portuguese (Portugal and Brazil).

更新日志:

1.7.1 1.7.0 1.6.0 1.5.2 1.5.1 1.5.0 1.4.1 1.4.0 1.3.0 1.2.1 1.2.0 1.1.0 1.0.0