WordPress query mechanism drag whole set of results into memory so they are not suited for such large chunks of information.
You can use numberposts
and offset
in get_posts()
to split process into chunks. I am not sure if you will be able to do it in single run even then, so you might need to save how many chunks you processed and start from there next time.
Related Posts:
- How do I query a custom post type with a custom taxonomy?
- how to group custom post type posts by custom taxonomy terms
- Posts per Page on custom Taxonomy Template
- How to get the parent’s taxonomy?
- Query posts by custom post type and custom taxonomy
- How to get only one category of custom post type?
- pre get posts changing the query
- Query for posts in 2 taxonomies
- ‘category__and’ for custom taxonomy?
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- List custom post type by custom tax term as page title
- how can i get posts from custom post type particular taxonomy category
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Query/list all terms and their custom post count
- Archive for custom taxonomy lists all posts instead of current taxonomy
- How to use custom taxonomies to reference complex relationships?
- Query Custom posts of same taxonomy as the post itself
- Conditional Query of Custom Post Type and custom taxonomy
- Show a Category X’s custom post type on Category X archive page?
- How to edit this code to get the categories in achieve page?
- Listing all term items alphabetically / sorting loop
- How to display Related Posts based on number of taxonomy terms matched
- How to make WP_Query not to show irrelevant posts?
- Custom query – get_the_terms not work
- Control content before and after custom post type loop
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Display custom posts randomly in custom taxonomy archive
- attach CPT data to a taxonomy
- Targeting custom post type via functions.php doesn’t work
- List all posts in taxonomy term
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Sorting the Loop by Taxonomy Value
- custom post type and a “sticky” position taxonomy
- Posts per Page on custom Taxonomy Template
- Getting Custom Posts with Custom Taxonomy
- WordPress custom post type
- Display 2nd category, only once, as sub-heading, in the loop
- Advanced Custom Fields: query posts filtered by multiple field values
- Inserting two categories
- cannot export data from CPT UI (books)
- Create a shortcode to display custom post types with a specific taxonomy
- List the categories under custom taxonomy
- Populate Taxonomy from Custom Posts
- Show related posts on single page by custom taxonomy on custom post
- Exclude from search all custom posts which are NOT in a taxonomy term
- Sorting for each custom taxonomy
- Dynamic variable for custom taxonomy in loop?
- wp_insert_post custom taxonomy
- ascending order custom post type
- Append taxonomy terms as class names in markup?
- Want to turn WordPress into a paid subscription directory
- Why is my custom loop not filtering correctly nor paginating?
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Custom post types with custom directories
- How to output wordpress custom tags separated by comma?
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Custom Taxonomy Permalinks Redirection
- shortcode to show custom post types by category
- Single Template that can be applied only via URL
- get custom post type
- How to hook custom taxonomies to custom post types and make the permalinks work?
- Display a grid of taxonomy terms at root taxonomy page
- Display Custom Taxonomy Alphabetically
- posttype/taxonomy/term archive page 404 error
- How to add attributes to taxonomies that may be different from post to post?
- Custom post type, permalinks, taxonomies and blog posts
- Taxonomy in URL
- Display related custom taxonomy posts in sidebar
- How to limit post per page of custom post type?
- Implementing Pillar Posts; Long Posts yet with Some Page-Like Handling?
- Dynamically insert code to custom post type loop
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- Custom taxonomy template list not working (404)
- Link From Single Post To Taxonomy Term Archive Page
- Print all the tags from a custom post type
- How to organize custom post type list by year?
- Calling related posts to a custom post type, taxonomy & Tag id
- Better in the long run to use post date or custom taxonomy to sort/separate posts by year?
- Custom Post Type Query W/Category Dropdown
- How to create subdomain for custom post type and associated custom taxonomies
- add_filter get array data before display in custom post_type
- Should I use a custom taxonomy or custom post type for grouping a list of panels associated with a group of tests?
- Remove custom taxonamy slug with pagination
- Taxonomies are not showing in the category dropdown
- get_the_terms child terms for current post/custom post only
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- Custom taxonomy- only output relevant terms
- Post types showing tables…Can I do that?
- Dropdown switching subcategories portfolio
- How to solve performance issue caused by custom post type overview with 20k+ custom taxonomy terms
- Prevent repetitive terms in get_the_term_list
- Displaying posts exclusively in their category (not parent)
- Query Distinct Taxonomies of Custom Post Type
- Show taxonomies from specific CPT
- Category / Custom Post Type permalink issue
- How to exclude certain portfolios from a loop
- Quering array of post types & pagination. Articles are repeating sometimes on different pages