WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 years ago

#37104 new enhancement

increase post_type field length from varchar(20) to varchar(100)

Reported by: ajwah Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.5.2
Component: Posts, Post Types Keywords:
Focuses: Cc:
PR Number:

Description

I complained about this issue here: https://wordpress.org/support/topic/why-should-post-type-names-be-between-1-and-20-characters-in-length?replies=1#post-8523345

Someone provided this history:
https://ticket2604.wordpress.com/2016/06/13/why-post-type-name-is-limited-to-20-character/

which is indicative to the fact that there should be no reason to restrict the length of post_type etc. to only 20 characters.
If you want to cut straight to the chase, then read this:
https://core.trac.wordpress.org/ticket/2604#comment:5

Change History (2)

#1 @SergeyBiryukov
3 years ago

  • Component changed from General to Posts, Post Types
  • Summary changed from varchar(20) should be replaced with varchar(100) to post_type varchar(20) should be replaced with varchar(100)

#2 @dd32
3 years ago

  • Summary changed from post_type varchar(20) should be replaced with varchar(100) to increase post_type field length from varchar(20) to varchar(100)

I'll copy a reply from #39507 to here for future discussion:

Worth noting that comment_type and post_type are both VARCHAR(20) while taxonomy is VARCHAR(32).

I'm not sure I see benefit in these fields being longer, they're designed as a short unique grouping of objects.

Note: See TracTickets for help on using tickets.