I have custom post type
product like wp ecommerce.
There are 30k posts in it. Also have relate custom taxonomy. Basically am trying to export those posts in csv, but query_posts with so many records is giving me trouble...
WordPress query mechanism drag whole set of results into memory so they are not suited for such large chunks of information.
You can use
I recently had to do an export for a blog with 34K posts and 75K comments. I was able to get it to work by modifying the WordPress Advanced Export plugin and increasing max_execution_time in php.ini from 30 seconds to around 5 minutes.
The plugin grabs a snapshot of all the post ids in the db then runs the batches in 20 post increments and loops back through until its done. I changed the increments to 40 which sped it up and allowed it to complete in a reasonable amount of time.
Here is an example of how the query is run:
The $where clause below is defined by a long list of if else conditionals based on the plugin options.
You could make a query by month or year to reduce the number of posts. Then you would have a couple of smaller .csv that you can merge together.
Also, you can try to export in .csv directly from the DB in phpMyAdmin.