We have a multisite setup where we are migrating around 120k articles for one site and 50k for another. These are coming from a very different CMS. Our migration script uses WP functions to create tags, categories, meta data, gallery photos, etc.
The issue is the script is a bottleneck for us.
We wrote a cron job to run the project and we get around 700 or less articles published an hour. Our code itself is optimized. DB queries from previous CMS database are quick but it seems like when it tries to process these on WP it slows down significantly. Especially with galleries.
I guess things like searching for similar slug name etc. are quite heavy.
Anyone know what to do?