wp_insert_post memory consumption October 14, 2022 by Tarik Billa Did some profiling, it was the 5k+ queries being stored in the $wpdb->queries array.