Default Permalink
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-i
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
- 01Go to “Settings” -> “Default Permalink” in the WordPress admin.
- 02Check “Enable” and save changes.
WP-CLI
- wp default-permalink status shows the settings and the number of posts with a multi-byte slug.
- wp default-permalink convert --dry-run lists the posts to convert and their new slugs; wp default-permalink convert converts them all (no 50-post limit).
- --post_type=page (comma-separated) converts only those post types, and --limit=500 stops 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.
- 01Upload the default-permalink folder to the /wp-content/plugins/ directory.
- 02Activate the plugin through the ‘Plugins’ menu in WordPress.
- 03Enable the plugin’s behavior from “Settings” -> “Default Permalink”.