How to Deal with Slow Imports in WP All Import

Generally, the importing process takes some time when doing programmatic SEO in WordPress using WP All Import. But if it’s taking unusual amounts of time, there might be something wrong and there are ways to fix it.

In this blog post, I will explain why the WP All Import WordPress plugin sometimes takes a lot of time to complete the import process and how you can speed it up.

Let’s take a look…

Why does the import process in WP All Import take too much time?

Some reasons why the import process might take a lot of time are:

  1. Your website hosting has low server resources and the import process is consuming all CPU and RAM
  2. There are multiple and/or large images and files being downloaded to the WordPress media library during the import process
  3. You are importing an extremely large data file with thousands and thousands of rows of data to be imported
  4. Your WordPress site already has thousands of posts and pages, and the import is creating additional pages

Now, let’s take a look at each of these in detail and also what you can do to speed up the process.

Speeding Up the Import Process in WP All Import

There are some tips and tricks that you can follow to accelerate the process, let’s take a look:

1. Have Enough Server Resources

When you import thousands of pages, your server needs to do a lot of work during the import process, and not having enough server resources significantly slows down the process. So it is recommended that you have enough RAM and CPU power in your server so that it can easily handle the import.

If your import is too slow, you can also temporarily scale up the server and then scale back down after the import completes.

I did an experiment where I published 50,000 pages on a WordPress site by using the WP All Import plugin. The site was hosted on a $6/month DigitalOcean server and the import process went smoothly; it took ~1.5 hours to complete the process, though.

But only upgrade your server if it’s running low on resources, if it already has enough resources, there won’t be any benefits of the upgrade.

2. Host External Images on Fast Servers

If you are hosting your external images on servers that are slow, the import process will take longer to download those images to the WordPress media library — the more images, the more time it will take to download them.

To verify, I recommend running the import process without images. If it is significantly faster than with images, it’s time to do something about images.

Some things that you can do are:

  • Host external images on a faster server, I use Cloudinary for hosting all my external images
  • Resize images so that they are not unnecessarily large, I resize all images to a width of 1200px
  • Compress images so they have lesser file sizes, I use Cloudinary’s transformations to auto-compress uploaded images

But instead of hosting the images on an external server, you can also upload all your images to the wp-content/uploads/wpallimport/files/ folder and use the option shown in the below screenshot.

Upload Images to the Same Server

In this process, the images don’t get downloaded from an external server and hence it’s faster. You can learn more about this method in the official documentation.

3. Disable do_action Calls and Reduce Records per Iteration

When a new post is created on your WordPress site, the do_action calls let other plugins and integrations integrate with each created post, which takes a bit longer. So if you disable the do_action calls, the process becomes a bit faster.

Configure Advanced Settings for Faster Imports

For this, you can navigate to the Configure Advanced Settings section of your import setting and check the box in front of the Increase speed by disabling do_action calls in wp_insert_post during import option.

Apart from this, you can also reduce the number of records per iteration from 20 to 10 or 5 or even 2 depending upon your hosting configuration. It will not significantly improve the speed, but the import process will not fail after that. You can refer to the above screenshot for this.

4. Manage the Database Transient Cache

If your WordPress site’s wp_options table in the MySQL database is bloated with the transient cache, you can use the Transients Manager plugin to view and delete the unnecessary ones to free up some space.

But if you don’t know what you’re doing, I would not recommend doing this on the production site.

5. Run Imports in the Background

After all these improvements, if the import process is still taking a lot of time, then you can set the process to run in the background, so you don’t have to wait by keeping the tab open. The process can keep running in the background as you sleep.

And you can do so by setting up appropriate cron jobs. I have explained everything in detail about automating the import process in this post. In the post, I have discussed different possible options for automation as well.

Final Words

If you’re on a shared hosting plan, generally, importing more than 50,000 pages would result in problems like slow import speed, slow page loading speed, website crashing, etc. And if you’re on a VPS hosting, you can easily generate more than 100k on a server with 1 vCPU and 1 GB of RAM.

If you want, you can sign up for DigitalOcean using my referral link and get $200 free credits to test the platform for 60 days. I use the hosting for all my pSEO sites.

That’s it.

If you need any additional help, kindly feel free to let me know in the comments below.

Join pSEO newsletter


✦ Loved by 1,000+ SEOs

✦ Not more than 2 emails a month

DeepakNess Avatar

Written by:

Leave a Reply

Your email address will not be published. Required fields are marked *