xwp/scheduled-redirects

Schedule activation/deactivation of Redirection Plugin redirects with WPVIP cache purging

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:wordpress-plugin

pkg:composer/xwp/scheduled-redirects

v1.0.0 2026-02-10 07:50 UTC

This package is auto-updated.

Last update: 2026-02-10 07:58:54 UTC


README

CI PHP Version WordPress Version

A WordPress plugin that adds scheduled activation/deactivation functionality to the Redirection Plugin, with automatic WPVIP cache purging.

Developed by XWP

Requirements

  • WordPress 6.5+
  • PHP 8.4+
  • Redirection Plugin 5.6+
  • Action Scheduler 3.8+ (bundled via Composer)

Installation

Composer (Recommended)

composer require xwp/scheduled-redirects

Manual

  1. Run composer install --no-dev
  2. Upload to /wp-content/plugins/
  3. Activate Redirection plugin
  4. Activate Scheduled Redirects

Usage

Navigate to Tools > Scheduled Redirects to:

  • Set scheduled start/end dates for redirects
  • Create new redirects with schedules
  • View status: Active, Inactive, Scheduled, On Schedule, Expired

Key Features

  • Scheduled Activation - Set a future date/time for redirects to automatically enable
  • Scheduled Deactivation - Set an end date/time for redirects to automatically disable
  • Automatic Cache Purging - WPVIP edge cache is automatically purged when redirect status changes
  • Reliable Scheduling - Uses Action Scheduler for dependable background processing
  • Simple Interface - Clean admin UI under Tools menu with search and filtering
  • Create New Redirects - Add new redirects with schedules directly from the plugin
  • Status Indicators - Visual badges showing Active, Inactive, Scheduled, On Schedule, and Expired states

Use Cases

  • Seasonal Campaigns - Schedule redirects for holiday promotions that automatically start and end
  • Product Launches - Set up redirects to go live exactly when a product launches
  • Temporary Redirects - Create time-limited redirects that automatically expire
  • Content Migrations - Schedule URL changes to coincide with content updates
  • A/B Testing - Rotate landing pages on a schedule

How It Works

  1. The plugin adds scheduling fields to each redirect in the Redirection Plugin
  2. When you set a start date, the redirect is disabled until that time
  3. Action Scheduler triggers the activation at the scheduled time
  4. When the end date arrives, the redirect is automatically disabled
  5. WPVIP cache is purged automatically to ensure changes take effect immediately

WPVIP Compatibility

This plugin is fully compatible with WordPress VIP environments:

  • Automatically purges WPVIP edge cache when redirects change status
  • Uses VIP-approved coding standards and practices

Development

Setup

composer install
pnpm install --ignore-workspace
pnpm start

Testing

pnpm test:php          # Run tests
composer lint          # Check standards
composer phpstan       # Static analysis
composer lint:fix      # Auto-fix issues

Local Environment

CI/CD

GitHub Actions runs:

  • PHPCS (WordPress-VIP-Go)
  • PHPStan Level 5
  • PHPUnit tests

Hooks

// Actions
do_action( 'scheduled_redirects_enabled', $redirect_id, $redirect );
do_action( 'scheduled_redirects_disabled', $redirect_id, $redirect );
do_action( 'scheduled_redirects_cache_purged', $redirect_id, $redirect, $action, $urls_to_purge );

// Filters
add_filter( 'scheduled_redirects_per_page', fn( $per_page ) => 50 );
add_filter( 'scheduled_redirects_purge_urls', fn( $urls, $redirect_id, $redirect ) => $urls, 10, 3 );

Privacy

Scheduled Redirects does not collect, store, or transmit any personal data. All schedule data is stored locally in your WordPress database.

Credits

Developed by XWP for WordPress VIP environments.

This plugin integrates with:

License

GPL v2 or later