300,000+
May 24, 2026
February 2, 2008
Converts Cyrillic characters in post, page, and term slugs to Latin characters. Useful for creating human-readable URLs.
Based on the original Rus-To-Lat plugin by Anton Skorobogatov.
Sponsored by Blackfire.
cyr2lat folder to the /wp-content/plugins/ directory.Version 7.0 is an architecture-focused release. It keeps the existing transliteration table, locale filters, post and term conversion tools, and WP-CLI command stable while moving slug handling to explicit services.
Existing posts, pages, terms, filenames, and WooCommerce product data are not destructively rewritten during the plugin upgrade. Use the Converter page or wp cyr2lat regenerate when you intentionally want to regenerate existing post and term slugs.
WooCommerce attributes created before 7.0 are not automatically migrated. Existing global pa_* taxonomies and existing local or variation attribute keys should be reviewed separately; any future migration must use a dedicated dry-run-first workflow.
Cyr-To-Lat 7.0.1 keeps legacy WooCommerce local variation attributes, including Any variations, aligned between the product form, add-to-cart request, and cart session.
Add this code to your theme’s functions.php file:
/**
* Modify conversion table.
*
* @param array $table Conversion table.
*
* @return array
*/
function my_ctl_table( $table ) {
$table['Ъ'] = 'U';
$table['ъ'] = 'u';
return $table;
}
add_filter( 'ctl_table', 'my_ctl_table' );
For instance, if your non-standard locale is uk_UA, you can redefine it to uk by adding the following code to your theme’s function.php file:
/**
* Use non-standard locale.
*
* @param string $locale Current locale.
*
* @return string
*/
function my_ctl_locale( $locale ) {
if ( 'uk_UA' === $locale ) {
return 'uk';
}
return $locale;
}
add_filter( 'ctl_locale', 'my_ctl_locale' );
Add similar code to your theme’s functions.php file:
/**
* Filter title before sanitizing.
*
* @param string|false $result Sanitized title.
* @param string $title Title.
*
* @return string|false
*/
function my_ctl_pre_sanitize_title( $result, $title ) {
if ( 'пиво' === $title ) {
return 'beer';
}
return $result;
}
add_filter( 'ctl_pre_sanitize_title', 10, 2 );
Version 7.0 uses explicit slug handlers for posts, terms, WooCommerce attributes, and other known save paths. A legacy sanitize_title bridge remains as a compatibility fallback for broad calls that older integrations may still rely on.
You can disable the broad fallback with this code:
add_filter( 'ctl_enable_legacy_sanitize_title_bridge', '__return_false' );
The filter receives the current default value, $title, $raw_title, and $context. Explicit known contexts, such as WordPress save handling, continue to use the dedicated 7.0 slug paths.
For debugging unknown bridge calls, define CYR_TO_LAT_DEBUG_LEGACY_SANITIZE_TITLE_BRIDGE as true. This diagnostic log is disabled by default and is not enabled by WP_DEBUG.
Add similar code to your theme’s functions.php file:
/**
* Filter filename before sanitizing.
*
* @param string|false $result Sanitized filename.
* @param string $filename Title.
*
* @return string|false
*/
function my_ctl_pre_sanitize_filename( $result, $filename ) {
if ( 'пиво' === $filename ) {
return 'beer';
}
return $result;
}
add_filter( 'ctl_pre_sanitize_filename', 10, 2 );
Add the following code to your plugin’s (or mu-plugin’s) main file. This code won’t work being added to a theme’s functions.php file.
/**
* Filter status allowed Cyr To Lat plugin to work.
*
* @param bool $allowed
*
* @return bool
*/
function my_ctl_allow( bool $allowed ): bool {
$uri = isset( $_SERVER['REQUEST_URI'] ) ?
sanitize_url( wp_unslash( $_SERVER['REQUEST_URI'] ) ) :
'';
if ( 0 === strpos( $uri, '/divi-comments' ) ) {
return true;
}
return $allowed;
}
add_filter( 'ctl_allow', 'my_ctl_allow' );
Add similar code to your theme’s functions.php file:
/**
* Filter post types allowed for background conversion.
*
* @param array $post_types Allowed post types.
*
* @return array
*/
function my_ctl_post_types( $post_types ) {
return [
'post' => 'post',
'page' => 'page',
'attachment' => 'attachment',
'product' => 'product',
'nav_menu_item' => 'nav_menu_item',
];
}
add_filter( 'ctl_post_types', 'my_ctl_post_types' );
Use the following command in the console:
wp cyr2lat regenerate [--post_type=<post_type>] [--post_status=<post_status>]
Where
-post_type is a list of post types,
-post_status is a list of post statuses.
Cyr-To-Lat 7.0 explicitly handles new and updated WooCommerce product slugs, product category and tag slugs, global attribute slugs, global attribute term slugs, local product attribute keys, variation attribute keys, frontend add-to-cart requests, cart session loading, REST/API saves, and admin save flows.
Existing WooCommerce attributes are not automatically migrated during plugin upgrade. This means existing global pa_* taxonomies, local product attribute keys, and variation attribute keys keep their current stored values until you intentionally change them. A future migration tool should be separate and dry-run-first so store owners can review the impact before any rewrite.
Regeneration of thumbnails with the command wp media regenerate can break links in old posts as file names become transliterated.
To avoid it, deactivate the cyr2lat plugin during regeneration:
wp media regenerate --skip-plugins=cyr2lat
Yes, you can!
Please report security vulnerabilities by email to:
security@kagg.eu
When reporting a vulnerability, please include as much information as possible to help us reproduce and investigate the issue, such as:
We will review your report and respond as quickly as possible.
Any variations, after upgrading from versions before 7.0.ctl_enable_legacy_sanitize_title_bridge compatibility filter for broad legacy sanitize_title behavior.| Version | Download | Type |
|---|---|---|
| 7.0.2 | Download | Stable |
| 7.0.1 | Download | Stable |
| 7.0.0 | Download | Stable |
| 6.8.0 | Download | Stable |
| 6.7.0 | Download | Stable |
| 6.6.0 | Download | Stable |
| 6.5.0 | Download | Stable |
| 6.4.1 | Download | Stable |
| 6.4.0 | Download | Stable |
| 6.3.0 | Download | Stable |
| 6.2.3 | Download | Stable |
| 6.2.2 | Download | Stable |
| 6.2.1 | Download | Stable |
| 6.2.0 | Download | Stable |
| 6.1.0 | Download | Stable |
| 6.0.8 | Download | Stable |
| 6.0.7 | Download | Stable |
| 6.0.6 | Download | Stable |
| 6.0.5 | Download | Stable |
| 6.0.4 | Download | Stable |
| 6.0.3 | Download | Stable |
| 6.0.2 | Download | Stable |
| 6.0.1 | Download | Stable |
| 6.0.0 | Download | Stable |
| 5.5.3 | Download | Stable |
| 5.5.2 | Download | Stable |
| 5.5.1 | Download | Stable |
| 5.5.0 | Download | Stable |
| 5.4.0 | Download | Stable |
| 5.3.0 | Download | Stable |
| 5.2.7 | Download | Stable |
| 5.2.6 | Download | Stable |
| 5.2.5 | Download | Stable |
| 5.2.4 | Download | Stable |
| 5.2.3 | Download | Stable |
| 5.2.2 | Download | Stable |
| 5.2.0 | Download | Stable |
| 5.1.0 | Download | Stable |
| 5.0.4 | Download | Stable |
| 5.0.3 | Download | Stable |
| 5.0.2 | Download | Stable |
| 5.0.1 | Download | Stable |
| 5.0.0 | Download | Stable |
| 4.6.4 | Download | Stable |
| 4.6.3 | Download | Stable |
| 4.6.2 | Download | Stable |
| 4.6.1 | Download | Stable |
| 4.6.0 | Download | Stable |
| 4.5.2 | Download | Stable |
| 4.5.1 | Download | Stable |
| 4.5.0 | Download | Stable |
| 4.4.0 | Download | Stable |
| 4.3.5 | Download | Stable |
| 4.3.4 | Download | Stable |
| 4.3.3 | Download | Stable |
| 4.3.2 | Download | Stable |
| 4.3.1 | Download | Stable |
| 4.3 | Download | Stable |
| 4.2.3 | Download | Stable |
| 4.2.2 | Download | Stable |
| 4.2.1 | Download | Stable |
| 4.2 | Download | Stable |
| 4.1.2 | Download | Stable |
| 4.1.1 | Download | Stable |
| 4.1 | Download | Stable |
| 4.0 | Download | Stable |
| 3.7 | Download | Stable |
| 3.6.5 | Download | Stable |
| 3.6.4 | Download | Stable |
| 3.6.3 | Download | Stable |
| 3.6.2 | Download | Stable |
| 3.6.1 | Download | Stable |
| 3.4 | Download | Stable |
| 3.3 | Download | Stable |
| 3.2 | Download | Stable |
| 3.1 | Download | Stable |
| 3.0 | Download | Stable |
| 2.1 | Download | Stable |
| 2.0 | Download | Stable |
| 1.0.1 | Download | Stable |
| 1.0 | Download | Stable |
| Development | Download | Trunk |