I finally found the custom post type data. It is stored in the wp_post table where post_type = custom post type (e.g. “products”). The field (column) data is stored in wp_postmeta where the meta_key is the column name and meta_value is the column value.
This query will bring back all data associated with the custom post type “products”:
SELECT P.ID, P.post_title, M.meta_key, M.meta_value
FROM wp_posts AS P
INNER JOIN wp_postmeta AS M ON M.post_id = P.ID
WHERE P.post_type="products" and P.post_status="publish"
ORDER BY post_title, meta_key
Related Posts:
- Save custom post type in different table
- Right way to store a large set of similar information on website? [duplicate]
- Should I use custom post types or a custom database tables for plugin development?
- Custom Post Types, or completely custom?
- Custom Post Type with Input fields to seperate table on database.
- Right way of storing large number of custom post fields
- How to use custom database tables for custom post types?
- Custom Post Type or Custom Tables
- Are custom post types suitable for storing high numbers of data elements, in this case chat messages?
- Custom post type or just use custom fields
- Create Pages from Database
- Use Custom Database with Custom Post Type
- Custom Search | Wrong output & question
- How do I write this SQL statement for Posts written in last 24 hours?
- Save or update data when custom post published
- update a post meta from a single table cell TablePress
- update custom post type meta from a shortcode
- Custom post type Vs. data in own table
- Using posts and postmeta table to store custom Address Book Plugin data
- How to use custom post type APIs, but use a different db table
- Developing WordPress on Kubernetes
- Recommended custom post type structure for TV Schedule site?
- Where to store custom tagging data associated with a custom post type
- wpdb custom post_type problem
- WP All Import – Using Xpath to set a select value
- Sorting custom post type columns with external data and without meta values
- How to use custom taxonomies to reference complex relationships?
- Create a clone from one WordPress site to another in a few minutes
- Database to page routing API?
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- How to handle a CSV with 65,000+ rows and make it searchable?
- How to change wp prefix for custom post type only?
- Is it possible to store Custom Post Type data in separate set of tables and still have wp_post class functionality?
- Modification of how the data is controlled/showed and stored
- Add update or delete database records using custom post type
- How to import a custom MySQL DB table into a WordPress custom post type
- WP_Query orderby and tax_query
- Importing Data from a Non-WordPress database, into WP
- How to organise this data within WordPress
- Organize WordPress site, so it can maintain with huge database
- Save custom post type to external database
- Show data from one Custom Post Type in another Custom Post Type
- Specifying meta field’s column type in Database using add_post_meta
- Is it a good idea to add a column to the posts table?
- Replace dynamically content in a custom database table when a custom post is created
- Running a song lyrics site on WordPress
- Save and user submitted data from a form and display them in the wp backend
- Dump custom post type database
- Should I use custom taxonomies or not?
- Designing a custom post type with a minimum number of meta fields
- Allow front end users to add data to a custom post type
- WordPress hook which triggers on post import
- Update all published posts at once
- Custom Columns for Custom Post Type Manager
- Entity to store contact form entries?
- Ideas to connect external database table to wordpress posts as custom field source
- Database alteration: users who voted
- WordPress as a frontend website for iOS app [closed]
- Using custom post types WordPress network
- delete duplicate meta_value with same post_id
- custom post type: own database table structure and custom “new-post” interface
- Import External XML
- Say I have a tech blog, how best would I store technical specs for a phone, if i use custom post types
- How do you make relational post types in WordPress? [duplicate]
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- Does this archive template part look like its making too many calls to the db?
- when looping through custom post data not appearing
- Custom post type and custom taxonomy key lenght & query performance
- How select query is generated in a Custom Post Type?
- dynamic vue widget inside custom post
- Create 3 Levels of relations with WordPress
- Exporting Post type from one theme and importing it to another theme
- custom data model – link and populate from admin backend
- How to store additional data that is related to core data
- Confused about where to store my data
- Event Manager: Events Deleted are still in DB as published but hidden in admin
- Populate custom post type/custom fields from an external database
- Limit Number of Custom Post Type Dashboard
- Automatically convert standard posts with custom fields to custom post types
- In WordPress do I create tables for my plugin or do I create custom post types for a Student and Classes Registration system?
- CPT or Custom Table for Repository of Serial Numbers
- Loop posts in a table ordered by a custom field value
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Shared Custom post type between WP network sites
- Custom Post Types and Posts are mixed
- Displaying database table in backend of wordpress
- custom post type for custom talbe
- Check in function on custom page
- Most efficient way of deleting post
- Problem with menu categories doubling up when updating database?
- Inserting into WP DB
- Save number of Facebook likes to database
- What is the most efficient way to manage changes my product comparison tables?
- WordPress and Unity high scores table
- Checking for published posts in a certain post type
- Switched server & domain name, now custom post types won’t save
- WordPress Admin Page Slow. Customer Post Type is the slowest
- Why WordPress does not Use Separate Table for Post Types (When Registring)?
- Remote database access on another wordpress site’s custom post type
- What would be the optimal CPT / Taxonomy design for the following entities structure