Custom Redirects Plugin releases
Wordpress plugin to manage redirect for static site astro-wordpress
by Jeffrey Haug · github.com/hozt/custom-redirects · website
Install
The author publishes release zips, so WP-CLI can install straight from GitHub:
wp plugin install https://github.com/hozt/custom-redirects/releases/download/1.2/custom-redirects-1.2.zipManage custom URL redirects from a simple admin interface. Supports 301, 302, and 307 redirects with CSV bulk import and WPGraphQL integration.
Description
Custom Redirects provides a lightweight, database-driven solution for managing URL redirects directly within WordPress. No bloat, no page builders — just a clean admin interface to add, edit, delete, and bulk-import redirects.
Features
- Add, edit, and delete individual redirects from the WordPress admin
- Support for 301 (Permanent), 302 (Temporary), and 307 (Temporary) HTTP status codes
- Bulk import redirects from a CSV file
- Duplicate detection during CSV import — skips rows with an already-existing Old URL
- Multisite compatible — each site in a network gets its own redirect table
- WPGraphQL integration — query all redirects via the
redirectsroot field - Redirects are matched against the incoming request path and executed before WordPress renders a page
CSV Import Format
The CSV file must include a header row. Columns:
Old URL, New URL, Status Code
/old-page, /new-page, 301
/another-old-url, https://example.com/destination, 302
The Status Code column is optional and defaults to 301 if omitted.
WPGraphQL Usage
If the WPGraphQL plugin is active, you can query all redirects:
{
redirects {
id
old_url
new_url
status_code
}
}
Installation
- Upload the
custom-redirectsfolder to/wp-content/plugins/. - Activate the plugin through the Plugins screen in WordPress.
- Navigate to Redirects in the WordPress admin sidebar to start managing redirects.
Frequently Asked Questions
How are redirects matched?
The plugin matches the incoming request path (everything after the domain, excluding the query string) against the old_url values stored in the database. The first match triggers a redirect with the stored status code.
Does this work on WordPress Multisite?
Yes. When network-activated, each site gets its own wp_X_custom_redirects table so redirects are isolated per site.
Can I import redirects in bulk?
Yes. Go to Redirects > Import Redirects and upload a CSV file. Rows with a duplicate Old URL are automatically skipped.
Does this require WPGraphQL?
No. The GraphQL types are only registered when WPGraphQL is active.
Changelog
1.2
- Align plugin version header with readme stable tag and changelog
1.1
- Fix redirect saving on WordPress Multisite by auto-creating per-site tables on init and for new network sites
- Fix CSV bulk import not saving, with nonce verification, upload error messages, and import result feedback
- Fix broken CSV import link on multisite subsites
- Fix inline edit forms in the redirects table
- Show admin error messages when add, edit, delete, or import database operations fail
- Add GitHub Actions workflow to build an installable zip on each release
- Bump minimum WordPress version to 7.0
1.0
- Initial release
- Add, edit, delete redirects from admin UI
- CSV bulk import with duplicate detection
- Multisite support
- WPGraphQL integration
Upgrade Notice
1.2
Syncs plugin version metadata with readme.
1.1
Fixes multisite saving, CSV import, and admin error feedback. Recommended for all multisite installs.
1.0
Initial release.
Releases
2 releases. Each count is every asset in that release; expand a row for the breakdown.