Link truncated: link_url column limited to 256 characters (3 posts)

  1. goto10
    Posted 6 years ago #


    I added a Link via the WP Admin area and realized that it was cut off at 256 characters. The link is rather long at 429 characters. It appears to be encoded in something similar to base64.

    I can do some kind of work around, but it would be preferable to be able to use the Links feature in this particular case. The link is inserted within the navigation area of a theme, and it's easier for a client to manage this way.

    Would this be a change that could be considered, or would it be silly for WP to support huge links like this?

    Worth noting: I altered the wp_links table and changed the data type on link_url from VARCHAR(255) to VARCHAR(1024). This allowed me to insert the huge link, so the DB is the limiting factor here. I'm not keen on changes like this though. In fact, I feel quite dirty now.

    edit: formatting

  2. esmi
    Forum Moderator
    Posted 6 years ago #

    I would be extremely careful about entering any link url that used anything like base 64.

  3. goto10
    Posted 6 years ago #

    I appreciate your concern esmi. The link is legit. It's from the ConstantContact newsletter service.

    I did a little more research into URL length specifications. It seems that there is no limit; however, browsers impose their own practical limitations. The shortest limit I've seen is around 2000 characters (by IE). So, it seems to me that the WP should accommodate the lowest practical limit imposed by browsers.

    Here's a source: http://www.boutell.com/newfaq/misc/urllength.html

Topic Closed

This topic has been closed to new replies.

About this Topic