[WordPress] 外掛分享: SlugSync

首頁外掛目錄 › SlugSync
WordPress 外掛 SlugSync 的封面圖片
全新外掛
安裝啟用
尚無評分
剛更新
最後更新
問題解決
WordPress 5.6+ PHP 7.4+ v1.0.0 上架:2026-08-30

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「SlugSync」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Imported products and posts often end up with slugs that have nothing to do with their titles. Fixing them by hand through Quick Edit is not realistic once you are past a few dozen.
SlugSync regenerates slugs in bulk from titles, exactly as WordPress would if each post were saved with an empty slug. Optional Free controls can first transliterate the title, leave its exact assigned WooCommerce SKU out of the URL, or add that SKU from product data. The rewriting is the easy part. The point of the plugin is doing it on a live site without breaking anything.
Build cleaner slugs without changing titles
Readable Latin characters are an optional part of every run. Cyrillic and Greek are transliterated locally by a map bundled with the plugin, so the same title produces the same slug on every supported host rather than one address on a server with PHP’s international text support and a different one without it. Greek follows ELOT 743, the standard behind Greek passports and road signs, which reads vowel pairs as pairs: Ναύπλιο becomes nafplio, not nayplio. Where the server does provide international text support, it extends coverage to further scripts such as Chinese without altering the Cyrillic or Greek result. Nothing is sent to a translation service, and this is transliteration rather than a translation into English.
For WooCommerce products, a second option controls how the exact SKU assigned to that product affects its slug. Leave the SKU out when it already appears in the title, or deliberately add it from Product data → Inventory when it does not. SlugSync does not guess at model numbers, remove unrelated codes or add the same SKU twice, and it leaves a name alone when removal would make the result unclear. The visible product title and stored SKU never change.
Both choices use the same Preview, report and Undo protections as an ordinary title-based run. The changes report notes which transformation produced each proposed slug, and returning from a preview restores the same choices for Apply.
Check the stack and measure the change
A read-only compatibility preflight names active permalink, translation, redirect, SEO and caching plugins that may also affect public URLs. It is a focused warning based on the active plugin list, not a promise that custom code or the whole server stack is compatible.
Every completed Preview includes a URL change summary measured from that run: public URLs changed, redirects WordPress can keep automatically, redirect rows that need importing, and targets adjusted to avoid conflicts. These are operational counts, not a guessed SEO score or a ranking forecast.
Preview before anything is written
The preview writes no changes and produces a CSV of every slug it would alter, with the old and new URL side by side.
Previews are collision accurate. If two posts share a title, one of them may have to take a numeric suffix. A naive preview cannot see slugs occupied or released earlier in the same run, so its redirect map can point at a URL that will never exist. SlugSync simulates WordPress’s real rules across the whole run: flat post types share one namespace, hierarchical slugs are scoped to their parent, drafts and pending items keep WordPress’s no-uniqueness behaviour, and existing numeric suffixes increment normally. Every suffixed post is flagged in a note column.
Old URLs keep working
WordPress records a post’s previous slug and quietly 301s the old URL to the new one. A direct database write would skip that, so the plugin writes the old-slug record itself. Your existing links keep resolving whether or not you use a redirect plugin.
That built-in redirect covers content that does not nest inside a parent: posts, products and most custom post types. WordPress does not record old slugs for pages, whatever tool changes them, so pages need the redirect report below. See the FAQ before running this on pages.
On top of that, every applied change is written to a second CSV of relative source and target pairs, ready to import into a redirect plugin as permanent redirects. It has no header row, because some importers treat a header as a live redirect, and it covers published posts only, because draft permalinks are query strings rather than real URLs.
Quiet writes
By default slugs go straight to the posts table, skipping save_post. On a store with thousands of products that avoids firing webhooks and integration syncs once per product, and leaves post_modified untouched, so your entire catalogue does not get a fresh sitemap lastmod on the same day. A normal update that fires all hooks is available if something in your stack needs it. Yoast indexables are cleared for changed posts on the quiet path, so canonicals do not go stale; a standard update leaves that to Yoast’s own save hooks.
Undo changes
Every run gets its own timestamped history entry and reports. An applied run’s report doubles as an undo: it restores the slugs recorded for that specific run. Any item whose slug changed again after the run is skipped instead of being overwritten. If another item has claimed an old slug in the meantime, Undo skips that conflict rather than creating two posts with the same slug.
Resume safely
Batch progress is stored by WordPress rather than only in the browser. Before Apply changes an item, a private write-ahead journal is flushed to uploads; the public changes row then becomes that item’s commit marker. If a tab closes, a hook fails, or a request is interrupted before the batch checkpoint is saved, Resume reconciles those rows without truncating or duplicating the Undo report. A run lock prevents overlapping tabs or administrators from processing the same catalogue at once.
Other details

Works on any public post type, not just WooCommerce products.
Batched with keyset pagination, avoiding the duplicate/skip drift caused by SQL OFFSET when items are added or removed during a run.
Keeps separate reports and undo controls for each run, pruning the oldest once fifty runs have accumulated so old reports do not pile up in uploads.
Shows a rolling live feed of the thirty most recent matches during a run, while the downloadable CSV retains the complete result.
Resumes interrupted runs and prevents overlapping runs.
Slugs are capped at a word boundary before they can overflow the database column.
Reports are written to a directory with a random name, so your content is not enumerable.
Restricted to administrators.
No telemetry and no external requests. The plugin never contacts a server.
Everything above is uncapped: no item limit, no trial, nothing expires.

About SlugSync Pro
SlugSync is complete on its own and has no limits. SlugSync Pro is a separate add-on, built and in final release checks at slugsync.com. It can remove unwanted words and unassigned product codes, build product URLs from WooCommerce fields, and extend transliteration to those fields and to term names; add chosen categories, tags and reusable attribute values from product names without changing those names; and safely update category, tag and product-attribute URLs with direct redirects, cache clearing and a seven-day 404 watch. It is not required for anything described above, and nothing described above will ever move into it.

延伸相關外掛

文章
Filter
Mastodon