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
- Querying Two Custom Post Types with OR Not Working
- How can I get the number of custom post type posts that have a specific attachment image set?
- Trash / Draft a WordPress custom post after custom date field expires
- Set a maxlength for the title input in a custom post type
- Posting to a Custom Post Type from front end – user generated content
- Display custom fields from custom posts in RSS feed
- Bulk Update Custom Fields for 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
- WordPress Custom Fields Won’t Save
- Update Post Meta for a logged in user
- Problem querying Custom post type by custom fields
- Found 2 elements with non-unique id (#_ajax_nonce) and (#_wpnonce)
- Add custom field to Posts and sort by it
- Orderby CPT custom fields not working
- WP_Query order by custom field, then randomly order some of results
- A better way to add a meta box to custom post types
- Rows with custom columns not well formatted after Quick Edit save
- Database to page routing API?
- Plugin – Combine Meta Box Input Fields into single saveble record
- Two Custom Post Types Many to Many Relationship
- Show custom post type relationships by taxonomy
- get_post_meta not working on publishing
- Query custom post type with ACF Date
- Custom setting to show or hide field
- Custom Meta Field – Remove comma from string with str_replace
- Using custom field content as expression in IF statement [closed]
- Meta Query Not Returning Output Despite Having Matching Values
- How to create a custom post type with additional fields?
- Callback to custom field is not working in WordPress REST API
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- Including metaboxes from custom post types in global search — continued
- ACF From & To Date Validations
- How do I set all of a particular post meta to a value within the custom post type I’m in?
- Query Multiple Custom Posts by Custom Fields
- Show image gallery from a custom field
- Using advanced custom fields from one custom post type in another custom post type / using nested shortcodes
- Dynamic dropdown select values depending on other custom field value
- How to render a custom post type template with custom fields using shortcode
- Disable saving posts as draft (make all posts mandatory regardless of the post status)
- Grouping metadatas into one
- Tracking changes in admin-page so user gets warning when leaving the page
- filter custom post in rest api with custom function
- Get Posts by multiple custom fields is not working
- How to change wp prefix for custom post type only?
- Woocommerce custom field search in custom post type [closed]
- Add custom field in comments form
- Custom Fields for Custom Post [closed]
- Order Custom Post Type by Custom Field Value
- Filter custom post types by a field value
- Displaying All Posts of a Custom Post Type in WordPress Multisite Backend
- Is it possible to store Custom Post Type data in separate set of tables and still have wp_post class functionality?
- Repeatable Fields Metabox with Textarea (or wp_editor)
- Add update or delete database records using custom post type
- How to use TinyMCE Editor for one of my custom post meta field?
- Custom REST endpoints for a custom post type with custom fields
- How to import a custom MySQL DB table into a WordPress custom post type
- How to Create a WordPress Plugin With Custom Post Type/Custom Field Features?
- Hierarchy and access control for Custom Post Types (CPT)
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- How to integrate a form (Ninja Form or Contact Form 7) with Custom Post Types?
- First custom field value (out of several) displayed twice after query
- Homepage’s content is dependent on the custom field values (set automatically), how do I get homepage to update without manually updating page?
- Meta Query posts not showing on ending date of custom field
- Cannot save CPT meta box
- Cross reference custom post types
- Adding Page Templates to post but it ignored it
- 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
- frontend image post uploader
- WP_Query orderby and tax_query
- Is there any way to add a “custom field” to the CPT archive page?
- How to Output which matched meta_keys were found from custom_type_posts?
- Multiple Frontend Filters Using Advanced Custom Fields
- Custom Post Fields at the beginning of a Custom Permalink
- Integrate Custom Post Type Events into Calendar
- Possible to filter custom post type with multiple meta data?
- Hierarchical custom fields
- How to get a custom field value of a custom post?
- Fields for different parts of a page
- Is it possible to activate customfield ‘text description’ upon activating the customfield ‘checkbox’?
- Facebook social publisher and custom post type fields [closed]