[wp-trac] [WordPress Trac] #14558: Separate Database Table Support for Custom Post Types

WordPress Trac noreply at wordpress.org
Sat Mar 2 13:23:22 UTC 2024


#14558: Separate Database Table Support for Custom Post Types
-------------------------------+------------------------------
 Reporter:  rahul286           |       Owner:  (none)
     Type:  feature request    |      Status:  reopened
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Posts, Post Types  |     Version:
 Severity:  normal             |  Resolution:
 Keywords:  2nd-opinion        |     Focuses:
-------------------------------+------------------------------

Comment (by jave.web):

 The initial proposal was for a plugin/theme developer to leverage the
 existing core parts for editor, displaying etc. while separating data in
 DB. Existing post types can stay as they are - so there is no backwards
 compatibility issue at all.

 Not even the slug is a problem - register_post_type already has a default
 behavior of using the post_type as the pre-slug.

 Cross-type searching is also irrelevant - if developer chooses to do this,
 they will have no problem creating a special paginated WP_Query for this
 post type - so I would skip mixing post types for WP_Query and simply
 default to wp_posts if table not specified or use the specified table.
 This could be start, then it could be derived automatically (multiple post
 type tables => document that only wp_posts will be used; one post type
 table => use that).

 The main use case are specific post types that have 10s or hundreds of
 thousands of posts. (This can range from forum to daily program list or a
 website with long history (10+ years) that emits about 5 posts a day for
 one of its specific post types.

 This would be most useful for the post types that by they nature have
 nothing to do with the core content of the site (blog posts, static pages,
 ...).

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/14558#comment:43>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list