Why does WordPress keep adding "-2" to my URL?
You renamed a post once a year ago. WordPress kept the old slug as a redirect and now refuses to let any new post reuse it without slapping -2 on the end. Delete the row and you get the clean URL back.
Delete the old slug. Reclaim your clean URL.
You renamed a post and WordPress saved the new one as /your-slug-2/. That extra -2 is there because the old slug is still locked in wp_postmeta. Slugs Manager scans every stale row, deletes them, and frees the clean URL you actually wanted, in bulk or on a schedule. $49.99/yr or $149 once.
22% · 1 click · manualon save_post · automaticSunday 03:00 · automaticEvery time you fix a typo, change a title, or rename a product, WordPress writes the old URL into wp_postmeta with the key _wp_old_slug and never cleans it up. That's why your new URL ends in -2, why wp_postmeta keeps growing, and why the standard "fix" is a risky phpMyAdmin DELETE. Three problems, one missing tool.
You renamed a post once a year ago. WordPress kept the old slug as a redirect and now refuses to let any new post reuse it without slapping -2 on the end. Delete the row and you get the clean URL back.
Both leading SEO plugins write their own redirect tables and leave wp_postmeta alone. The data WordPress added is still there, year after year, in every backup and every migration.
The internet's standard advice is to fire a raw DELETE in phpMyAdmin. It works until it does not. One forgotten WHERE clause and you are restoring from backup at 3am explaining to a client what happened.
The plugin does four jobs well: scan the wp_postmeta table for old slugs, list every one with post context, delete selectively or in bulk, and schedule the cleanup so the table never bloats again. Plus regenerate-from-title, on-save triggers, WooCommerce + WPML + multisite support.
Every row shows the old slug, the current slug, post title, and post type. You see exactly what you are about to remove before you click.
Run the first cleanup manually so you see the scale of the problem. Then switch to automatic so it never builds up again.
WP-Cron handles the trigger. Five preset frequencies in the dropdown. Or set a custom interval via the alg_sm_cron_interval filter.
Delete the row holding the old slug and WordPress lets you save the post at the original URL again. No suffix, no compromise.
Filter the scan by post type so you can keep blog redirects while cleaning out years of seasonal product slugs in one pass.
Bulk-rewrite every slug to match its current post title. Great after a CSV import, a translation migration, or fixing legacy IDs in URLs.
A 50-site multisite network can run a different schedule on each install. WPML installs are scanned per language so translated redirect chains stay intact.
Upload the .zip from Plugins → Add New, then activate. No setup wizard, no configuration screen to click through.
The scan finds every _wp_old_slug row in the database and lists them with post title, current slug, post type, and ID. No SQL required.
Tick individual rows, filter by post type, or hit "Remove all". Pro version remembers the filters between sessions.
Pick a frequency in the dropdown - minute, hourly, twice daily, daily, or weekly. Or toggle clean-on-save so it fires on every Update click.
WordPress core free · no cleanup |
Yoast SEO Premium $118.80/yr · no lifetime |
Permalink Manager Pro $79/yr · $149 lifetime |
WPFactory $49.99/yr · $149 once |
|
|---|---|---|---|---|
| core: cleaning the wp_postmeta table | ||||
| Scan database for _wp_old_slug rows | ✕ | ✕ | ✕ | ✓ |
| List every stale slug with post context | ✕ | ✕ | ✕ | ✓ |
| Delete old slugs from the database | ✕ | ✕ | ✕ | ✓ |
| Selective or bulk deletion | ✕ | ✕ | ✕ | ✓ |
| automation | ||||
| Scheduled cleanup (minute · hourly · daily · weekly) | ✕ | ✕ | ✕ | ✓ |
| Clean-on-save trigger | ✕ | ✕ | ✕ | ✓ |
| Regenerate slugs from post title | ✕ | ✕ | manual per-post | ✓ bulk |
| Flush rewrite rules tool | ✕ | ✕ | ✓ | ✓ |
| redirect handling | ||||
| Auto 301 from old slug to new (core behaviour) | ✓ | ✓ | ✓ | ✓ |
| Edit or remove individual redirects | ✕ | ✓ | ✓ | ✓ |
| 404 monitor | ✕ | ✓ | ✕ | - |
| scope & compatibility | ||||
| WooCommerce products + variations | - | ✓ | ✓ | ✓ |
| WPML / Polylang per-language scan | ✕ | ✓ | ✓ | ✓ |
| Multisite per-site schedule | ✕ | not specified | not specified | ✓ |
| pricing & ownership | ||||
| Free version on .org | - | ✓ SEO only | ✓ Lite | ✓ |
| Lifetime tier | - | ✕ | ✓ $149 · 1 site | ✓ $149 unlimited sites |
| Multi-store licensing | - | 1 site / license | 1-2 sites | ✓ unlimited sites |
| 10-year cost | $0 | $1,188 | $149 | $149 |
| 50+ plugins (All Access) | - | ✕ | ✕ | ✓ $499 |
|
Ready to clean every old slug WordPress left behind? ↓
Jump to pricing
|
||||
A national news site publishes 40+ posts a day. Editors fix headlines on the fly, which writes a new _wp_old_slug row every time. After 18 months they had 94,000 of them. Slugs Manager scanned them all, deleted in one pass, and now runs hourly so the table never grows again.
Daily backups dropped from 1.2 GB to 940 MB. The wp-admin Posts list now loads in 0.4s instead of 2.1s.
A clothing brand renames thousands of products each season ("Winter 23 Hoodie" → "Winter 24 Hoodie"). Every rename leaves an old slug. After 4 seasons their wp_postmeta carried 38,000 dead rows. Slugs Manager runs on a weekly schedule, scoped to the product post type, and the table stays clean.
Cart-page render time dropped 14% on the product listing. Database backup size cut by 23%.
A WordPress agency runs 50 client sites on a single multisite network. Every client has different content velocity. Slugs Manager activates network-wide, each subsite picks its own schedule (news clients hourly, brochure sites monthly), and the network admin sees a roll-up of stale rows across the whole install.
Agency stopped charging clients for "database cleanup" hours. Plugin paid for itself in the first month.
Using the plugin? Leave a review on WordPress.org.
"Great plugin and really great Service! I needed some support and I was kindly helped, almost directly with best results I could wish for."see review →
"Does exactly what it says. Scanned a 6-year-old blog and surfaced 47,000 stale rows in seconds. One click, gone. Backup file 18% smaller."see review →
"Scheduled hourly cleanup is the killer feature. We push 60 posts/day and editors rename headlines constantly. Set once, never thought about it again."see review →
Every WPFactory plugin ships with the same eight guarantees. Here's what running this one looks like in practice.
One scan query, one delete query, batched. No extra tables. Scheduled tasks run via native WP-Cron, never via long-running PHP requests.
Every filter is documented (alg_sm_scan_post_types, alg_sm_cron_interval, alg_sm_after_delete). Read the docs here.
Email-only at [email protected]. See Tiny's review: a real bug report became a release within days. Pro plans skip the queue.
14-day refund on yearly and lifetime, 30 days on All Access, no questions asked. If the scan does not surface what you expected, support helps; if it still does not fit, you walk away whole.
All Access is $499 once for all 50+ plugins, lifetime, unlimited sites, and it includes every plugin we release later. Three lifetime licenses at $199 already cost $597, so the bundle usually wins by your third plugin.
Tested against the latest WordPress and PHP within days of every release. Plays nicely with WP 6.9, PHP 8.3, and the upcoming WP 7.0 changes to rewrite rules.
Compatible with Yoast, Rank Math, Redirection, All in One SEO, SEOPress, WPML, Polylang, WooCommerce. The cleanup is scoped to wp_postmeta so it never collides with their redirect tables.
You do not need to touch phpMyAdmin or write SQL. Open Tools → Slugs Manager, scan, pick what to remove, click delete. Pro adds the schedule dropdown and that is the entire learning curve.
This is what you see inside WordPress once the plugin is activated.
14-day refund on yearly and lifetime, 30 days on All Access. Lifetime pays for itself by year 3. All Access pays for itself with any 2nd plugin you'd ever use. Yearly auto-renew can be turned off in your account.
Buy once. Owns itself by year 3. Use on every site you own.
This plugin + 49 others, lifetime updates, unlimited sites - for $300 more than Lifetime alone.
wp_postmeta table under the meta_key _wp_old_slug. WordPress refuses to let any new post reuse a slug it has already recorded as an old one, so it appends -2 (or -3, -4) instead. Delete the row and the original slug is free again. That is exactly what Slugs Manager does, without you touching SQL._wp_old_slug postmeta entries WordPress writes every time you rename a post, page, or product. Those rows accumulate forever by default. Slugs Manager scans them, shows you the list, and lets you delete in bulk, individually, or on a schedule. The published post itself is untouched._wp_old_slug rows does not unpublish or rename anything. The only caveat is the built-in WordPress 301 redirect from the old URL stops working once you delete that meta. Keep redirects elsewhere (Rank Math, Yoast, Redirection plugin) if the old URLs already have inbound links you want to preserve.wp_postmeta row that WordPress wrote. Over 5 years a high-publishing site can carry tens of thousands of those rows. Slugs Manager is the only plugin that surfaces them, lets you decide, and deletes.wp_postmeta and reduces query overhead on saves and rewrite rules.Scan every _wp_old_slug row in wp_postmeta. Reclaim the clean URL WordPress wouldn't give you. Delete selectively or in bulk. Schedule automatic cleanups every minute, hour, day, or week. Clean on save_post. Regenerate slugs from titles. WooCommerce, WPML, multisite native. 4,500+ sites already running it. 14-day refund if it's not for you.
4,500+ stores · 4.5★ across 15 reviews · WordPress.org plugin · 14-day refund