Ready to get started?Download WordPress


UTF8 slug character limit (1 post)

  1. dfjehb2
    Posted 5 months ago #

    For utf8 characters (say Arabic, Hebrew etc.) the post slugs (i.e blogname.com/example-of-slug-for-post) are too short. WordPress cuts characters and it is impossible to have a slug with ~6 words. The only workaround in this case is editing the core functions, e.g.:
    in wp-includes/formatting.php
    $title = utf8_uri_encode($title, 200);
    and in wp-includes/post.php
    $alt_post_name = substr( $slug, 0, 200 - ( strlen( $suffix ) + 1 ) ) . "-$suffix";
    In addition, we have to edit the database structure (wp_posts).
    And with every wordpress update it is gone. Can you please make it longer? Or better allow the user to set the max length in config (define some constant).


You must log in to post.

About this Topic