[wp-hackers] Best functions in WP for bulk MySQL processing?

Mike Schinkel mikeschinkel at newclarity.net
Sun Mar 14 04:33:28 UTC 2010

Hey all,

I'm writing a tool to help automatically move from one domain to another.  To do this I need to process through all post_content and post_excerpt fields and change any image locations that reference the old domain with the new domain (there are other things I need to do but I'm taking baby steps first.)

As far as I can tell WordPress' database functions like $wpdb->query() load all posts into memory which won't work for a really large database; it would exhaust memory.  While I can easily write SQL code using the mysql_* functions I'd prefer to do it using WordPress functions.  Are there functions available to use for bulk processing, one I've just not found yet?


More information about the wp-hackers mailing list