Separate Database Tables For Different Post Types

one big problem with wordpress is that everything on it is a post(a record in wp-posts table)! images, posts, pages, products(for example in woocommerce), portfolios, Post Revisions… Almost everything exists as a record in wp-posts table and the main difference between them is that their “post type” field are different! so by passing time your wp-posts table getting bigger and bigger and you can’t do a thing about it unless remove posts like “Revisions” to make the table a bit lighter! is there a way to put main posts like “pages”, “posts” and “medias” into separate tables?

1
1

So the only reason you want to re-architect WordPress to use multiple tables for different post types is because your posts table is getting bigger too fast? I assume the underlying issue for you is that performance is suffering?

Instead, I suggest adding appropriate indexes to the post table for the queries you are finding unacceptably slow. This will be a whole lot easier and you won’t have to have a nonstandard version of WP to deal with for everythi.g else you want to do.

Here’s one reference to help with indexing.

Leave a Comment