WordPress CSV Importer takes a long time to finish

I have created a lot of custom CSV importers for WordPress in the past and I have come across issues related to the time it takes for them to finish processing.

Whenever the importer starts running, it starts off importing a lot of posts per second but this speed keeps decreasing and I am trying to figure out the reason for this and if whether there is something that I can do to speed up things.

Some importers I create import up to 100k entries.

This is how they work:

  1. Load rows from CSV file into an array
  2. Get row from arrow
  3. Create a post using this row
  4. Add meta values to this post from the row
  5. Go back to #2

In some cases I have observed these importers to import as many as 200 entries in a few seconds when they are launch and this comes down to around 5 to 10 in a few seconds.

Does anyone know what the reason for this could be and if whether there is something that can be done about it?

Topic csv bulk-import Wordpress

Category Web


This need some server side tune ups. In general the import timing depends on no of attributes imported per post. In particular handling media files like inline images within post, featured image etc. In case of https://wordpress.org/plugins/wp-ultimate-csv-importer, we have an option like no. of post server requests to balance the server load, memory and execution time within maximum limits as a solution.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.