Bulk update wordpress posts

One implementation detail of how WP works with database is that it always drags all query results into PHP values and memory space. In other words it is highly unlikely to throw any heavy query at WP and not have it collapse. Notably any plugins that deal with large queries (such as database backup ones) often write their database access layer from scratch instead of using WP API.

So implementing bulk operations has to be a little more elaborate. Querying should be split into smaller batches and they should be processed sequentially. You would need to write that logic yourself or find an existing solution. I think there are some around, but I hadn’t used any generic ones.

The alternate approach, in some cases, is to hook update logic to access of individual posts. If giant one-time complete update of everything is not required, updates can be spread over time in such fashion with no need for throwaway update code and no concern about resource impact.