Linux 软件免费装
Banner图

Parich Long Slug

开发者 parich
更新时间 2026年10月15日 14:10
捐献地址: 去捐款
PHP版本: 7.4 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

redirect permalink slug thai long url

下载

0.1.0

详情介绍:

WordPress stores slugs in a column 200 characters long. A Thai letter takes 9 characters once encoded for a URL, so a Thai title is cut after about 22 letters, often in the middle of a syllable. Parich Long Slug makes room for long slugs, keeps them safe through WordPress updates, and repairs the damage another plugin, Long URL Maker, has done on many sites. Long slugs Safe through WordPress updates When WordPress updates its database, it changes the slug columns back to 200 characters and cuts every longer slug. That is what breaks sites using Long URL Maker. This plugin: Repair what Long URL Maker damaged Long URL Maker cuts slugs at 200 characters when WordPress updates, rewrites every slug from its title when it is deactivated, and puts old slugs back whenever the WordPress version changes. Settings → Long Slug → Repair slugs finds that damage and proposes the original slugs: For developers Source code The complete source and its tests are on GitHub: github.com/parich/parich-long-slug.

安装:

  1. In your dashboard go to Plugins → Add New Plugin, search for "Parich Long Slug", then install and activate it. You can also upload the ZIP file under Plugins → Add New Plugin → Upload Plugin.
  2. Activation widens the slug columns and installs the guard. Check Settings → Long Slug: every line of the status table should be green.
  3. Optional: set the longest slug for new posts and terms.
Coming from Long URL Maker
  1. Back up your database.
  2. Install and activate Parich Long Slug while Long URL Maker is still active.
  3. Deactivate Long URL Maker with the Deactivate Long URL Maker safely button in the notice. Do not use its usual Deactivate link: that runs its routine that rewrites every slug from the title.
  4. Go to Settings → Long Slug → Repair slugs, click Scan for damaged slugs, check the proposals, then repair.
  5. Clear any page cache and let your sitemap plugin rebuild its sitemap.
Do not activate Long URL Maker again. If someone does, this plugin switches it off at once, before it can restore old slugs. You can delete Long URL Maker after the repair; its backup table stays in your database until you remove it yourself.

屏幕截图:

  • Repair slugs: the scan lists slugs that were cut or rewritten, the original it proposes and the evidence for it. Items marked "Ready" can be repaired in one go.
  • After a repair: each repair can be undone, and the old addresses redirect (301) to the repaired posts.

常见问题:

Why can't WordPress keep long slugs by itself?

Its database schema says the slug columns hold 200 characters, and every database update applies the schema again. Plugins that widen the columns lose the fight at the next update, because plugins are not loaded while WordPress updates its database. The guard in mu-plugins is loaded even then.

What does the guard file do? Can I delete it?

It changes one thing: the size WordPress gives the two slug columns while updating its database. It is copied from this plugin, never downloaded. If you delete it, it is put back the next time an administrator opens the dashboard. If it cannot be written, long slugs still come back after an update from the plugin's copy, and the status table tells you.

The block editor removes Thai vowels and tone marks from the slug field.

The block editor's slug field removes every combining mark when it loses focus, so "ข่าว" becomes "ขาว". This plugin compares the slug with the title when the post is saved and puts the marks back when that is all that changed. A slug you typed differently is kept as you typed it.

Which damage can the repair tool not undo?

  • A slug rewritten from the title, with no evidence of the original anywhere (no backup row, no SEO data, no link, no 404 log, no import): you type it yourself, or import a URL list from Search Console or your server logs.
  • An old slug put back by Long URL Maker's restore: both were real addresses, so you choose.
  • "-2", "-3"… slugs cut when the post was made: their address never changed, so lengthening them is offered but not pre-selected.

What happens to the redirects if I deactivate or delete the plugin?

They stop when the plugin is deactivated and are deleted with it. Download them first (Repair slugs → Download the redirects (CSV)) and add them to a redirect plugin. The Plugins screen reminds you while redirects exist.

Will very long URLs cause problems?

Some browsers, crawlers and sitemap tools refuse URLs longer than 2,048 characters. A long slug under a long parent page can get there; the status table lists such posts. The default length of 1,000 bytes keeps a post's URL well under that.

What does uninstalling remove?

The plugin's tables (the copy of long slugs, scan results, the repair log and the redirects) and its settings. It never shortens the slug columns or changes a slug. It removes the guard only when no slug is longer than 200 characters, because without it the next WordPress update would cut them. Long URL Maker's backup table and settings are left alone.

Does it work on multisite?

Not yet: network activation is refused.

How can I support the plugin?

The plugin is free, with every feature for everyone. If it is useful to you, you can make a donation. Thank you!

更新日志:

0.1.0