View Categories

How to Regenerate WordPress Slugs from Post Titles

To rebuild post slugs so they match the current titles, use the Regenerate Slugs tool in Slugs Manager: Delete Old Permalinks from WordPress Database. This is handy after a content overhaul or a rebrand, when titles have changed but the URLs still reflect the old wording. Regenerate Slugs is a Pro feature, found under WPFactory > Slugs Manager.

The Regenerate Slugs tool in Slugs Manager Pro

Before you start #

  • Slugs Manager Pro, active with a valid license.
  • A full database backup. Regeneration has no undo.
  • A redirect plan, since changing a slug changes the post’s URL.

How it works #

For each post of the types you select, Regenerate Slugs builds a slug from the post title (the same way WordPress does, using sanitize_title()) and updates the post’s current slug to match. A slug is only changed when the title-based slug differs from the current one, so posts that already match are left untouched.

Steps #

  1. Go to WPFactory > Slugs Manager and scroll to the Regenerate Slugs section.
  2. In the post-type selector, choose one or more post types. The list contains every searchable post type on your site, such as posts, pages, attachments, and products.
  3. Click Regenerate and confirm the warning. There is no undo for this action.
  4. Slugs Manager reports how many slugs were regenerated.
Setting Option ID Default Free/Pro
Post types to regenerate alg_sm_regenerate_slugs_post_types Post Pro

Important: when a slug changes, WordPress stores the previous slug as an old slug and redirects the old URL to the new one. Keep those redirects in place, or set up 301 redirects, before you later clear old slugs, otherwise the URLs you just changed can return 404s.

Large sites #

Regenerate Slugs processes all matching posts in a single request. On a very large site this can be slow or time out, so regenerate in smaller batches by selecting fewer post types at a time, and back up first.

Ready to set this up? #

Regenerate Slugs is a Pro feature of Slugs Manager. If you are still on the free version, upgrading unlocks it along with scheduled clean ups and clean up on save post. Get Slugs Manager Pro.