Directory / plugin
Default Permalink
v1.10.3 · by Redwoodcity
Prevents multi-byte (URL-encoded) slugs in the default permalink. Multi-byte URL can still be used when the user explicitly specifies it.
About this plugin
When a post title contains multi-byte characters (such as Japanese), WordPress generates a URL-encoded slug like %e3%81%82..., which results in a long and unreadable permalink.
This plugin replaces such auto-generated slugs with {post_type}-{post_ID} (e.g. post-123). A multi-byte slug is kept as-is when the user has explicitly specified it.
Optionally, new categories, tags and other terms with a multi-byte name can get a slug such as category-12.
Usage
- Go to “Settings” -> “Default Permalink” in the WordPress admin.
- Check “Enable” and save changes.
WP-CLI
wp default-permalink statusshows the settings and the number of posts with a multi-byte slug.wp default-permalink convert --dry-runlists the posts to convert and their new slugs;wp default-permalink convertconverts them all (no 50-post limit).--post_type=page(comma-separated) converts only those post types, and--limit=500stops after that many posts so a large site can be converted in steps; the command prints an--after=<ID>value to continue from.
Site Health
Tools -> Site Health recommends enabling the plugin when it is installed but not enabled, and shows how many posts still have multi-byte slugs, with a link to the settings screen.