Support » Requests and Feedback » Store pages in separate WP tables

  • lifeforceinst


    To improve database separation and optimisation WordPress it is recommended that static pages should be stored in a separate WordPress table such as _pages instead of being combined in the _posts table along with blog posts..

    Creating and using a separate table would mean that pages are no longer mixed posts. Because the table is dedicated to pages and not mixed with other WordPress terms, this would result in speedier database operations and faster display of WordPress pages and posts. Also pages could be more easily by backed up, optimised, ported or migrated between testing and production sites.

    Using a separate table provides a clear distinction between posts and pages in the database.

    All existing WordPress function calls would need to be updated to point to the new structures. A function would also be necessary to convert the database to the new format were pages are stored in the new tables.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Dion Designs


    What about navmenu items? Those are also stored in the _posts table.

    Personally, I don’t think separating out pages and navmenu items will have much (if any) positive effect on DB performance. That’s because the major bottleneck is in the _postmeta table, not the _posts table.

    The indentical issue exists in the _usermeta table. In fact it’s worse due to the IMO questionable decision to store the autologin keys (erroneously called sessions) there as opposed to a separate table.



    Agreed, there could be many other places where WordPress could be improved in relation to the use of the database tables. It seems in many cases people have thought lets just use a current table, rather than thinking about sound database design and creating tables for specific purposes.

    As you indicate navmenus are also a good candidate to move from the _post table.

    An ideal candidate for optimisation would be to have transients in a separate table rather than continually writing to the _options table.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Store pages in separate WP tables’ is closed to new replies.