You could encode them as JSON, or as serialized strings (the latter of which you can do using functions already baked in to WordPress). Both of these options will let you keep the number of database rows down.
However, both of these options will also significantly hamper your ability to search the data, or deal with it meaningfully in other ways if you need to in the future.
It does not matter if you have a large number of rows in your database.
If your site gets to the size where that would be a problem, then your hardware will need to grow accordingly. You will put much more load on your server by processing encoded data (or doing esoteric queries to get the data) in one row than you would if the custom fields were all in their own rows.
WordPress can handle a lot of data – let it 🙂
Related Posts:
- Custom post type or just use custom fields
- Using posts and postmeta table to store custom Address Book Plugin data
- WP All Import – Using Xpath to set a select value
- Sorting custom post type columns with external data and without meta values
- Store CPT ‘Reviews’ average ratings to a WordPress DB table or to a DB custom table?
- Importing Data from a Non-WordPress database, into WP
- Specifying meta field’s column type in Database using add_post_meta
- Ideas to connect external database table to wordpress posts as custom field source
- delete duplicate meta_value with same post_id
- 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?
- when looping through custom post data not appearing
- custom post types, custom fields and normalization
- How to replicate data storage and querying using WordPress. Custom posts/fields or Custom db tables?
- Confused about where to store my data
- Populate custom post type/custom fields from an external database
- Automatically convert standard posts with custom fields to custom post types
- How to enable the user to add value through the admin panel?
- Displaying database table in backend of wordpress
- Hide custom post type field from author?
- echo value from ‘select’ field type into page template using cmb2?
- How to use custom database tables for custom post types?
- How to hook get_terms() to only show count of posts that have custom meta
- ACF Relationships in Custom Post Type Permalink
- Search Custom Post Type with all meta attached?
- Automatically assign a custom post to a custom taxonomy based on custom field value
- Not sure why my custom post meta field isn’t saving
- Display two post types ordered by two custom fields
- How loop through posts based on custom fields
- Sort by two dates. Default entry date and custom field if present
- Get Custom Field Values by Another Custom Field in WordPress
- Conditional to modify query results
- Create a random unique 6 digit number as custom field for custom post type
- Get all Posts If has same custom field values in Posts
- Retrieve value of a category’s custom field
- Rewrite and custom post type: order by custom field not working
- wp_query check if integer exists in custom field’s array
- Add field to all custom post types
- How can I use get_post_meta with add_rewrite_rule to build custom permalinks?
- Visual editor issue by having multiple tiny mce editors in a CPT
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Dynamic dropdown select values depending on other custom field value
- Grouping metadatas into one
- Add update or delete database records using custom post type
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Include related custom fields from one post type in another post type’s JSON feed
- Admin Custom Meta Box – Pull Last 5 Posts from Custom Post Type
- Displaying and searching Custom Posts
- How to let users choose where to search for posts?
- It’s possible to hide body copy box for a custom post type?
- Show data from one Custom Post Type in another Custom Post Type
- How can I add a custom field to an existing custom post type?
- How to get a custom type post data when it has a connection with another custom type post?
- Display Repeatable Meta Box Content
- WP_Query orderby not work with meta_key
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Custom Field not saving in WordPress
- Reusable metabox backend and frontend
- How to display wp_post by custom field value?
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- WordPress as a frontend website for iOS app [closed]
- Get A Custom Field From A Custom Taxonomy Of A Custom Post Type [closed]
- “Custom Field” to Excerpt field” for pages? [closed]
- Let users upload image(s) to the post from front end
- How to import database table as custom post type and custom fields?
- Custom Taxonomy dont save in a frontend form for post a custom post
- Insert custom fields to a custom post type
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- Fill custom fields when saving custom post types
- Should i use custom post type for a custom footer?
- Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [closed]
- A sports wordpress website
- How do I ensure that post_type and Taxonomy use the same slug?
- How to make an API call to a custom post type but filtering by meta value?
- Migrate Custom Post Type with Custom Fields data and parent child order
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Custom Form / Search with Custom Post Type Data
- wp_set_object_terms creates taxonomies but does not add custom posts to it
- Custom Column in CPT admin table not updated after Quick Edit save
- Display Custom Field or Custom Taxonomy in front page /post/product
- PHP Warning with Custom Fields
- Custom post types & Pages hierarchy – Error 404
- filter rest api post by a acf filed
- How to prepend text to custom field value A, but only if custom field value B matches a certain string?
- How do I extract the contents of a CPT’s custom field for all posts?
- How to delete comma from the end of results? [closed]
- Publish post and create additional posts with same content
- Creating multiple CPT posts from one Gravity form
- Converting a checkbox filter for custom fields to a dropdown
- Function not pulling image or text from custom post type
- Custom field totals
- If i have custom post type with 5 custom fields do i have to create a new loop to reference each one?
- How to show animal lineage/pedigree in WordPress?
- WP_Query arguments: Loop through custom post type – get all entries except excluded meta_key?
- Types plugin isn’t compatible with my custom post type
- Show Posts in Vertical Tabs with Scrollbar
- How do I filter a custom post type loop by a field?
- Custom Post type as Taxonomy
- WP Query + custom fields: How to query event posts from the current date backwards 6 months and organize it month by month?
- Update Custom Field daily within 7days
- Remote database access on another wordpress site’s custom post type