Get 30% off your WordPress Hosting with code WPSAVE10. Launch Faster. Save More!
  • 00 Days
  • 00 Hours
  • 00 Minutes
  • 00 Seconds

Why might WP All Import cron imports fail? - SIRSTEVEHQ CP

If you run a WooCommerce store or hosting a WordPress site where you need to import and export data WP All Import is a widely used tool to managed this. It can be frustrating when the crons you set-up are failing.

There are a few reasons why WP All Import cron jobs/scheduled tasks may fail to run. The methods below will optimise the crons so that they should always run successfully and at the desired time. 

Switch the standard HTTP method to PHP-CGI

WP All Import uses HTTP GET calls to perform the import process which can cause imports to time out after 5 minutes. We'd recommend optimising the method used to perform the import by switching to use the PHP command line. That way the crons have a much longer timeout and can do all the hard work in the process itself; all while avoiding the HTTP timeout.

To do this, you can add your cron jobs using the following structure (i.e. a WGET) and we'll handle the rest for you.

wget -O/dev/null http://domain.tld/wp-cron.php?export_key=XXXX&export_id=X&action=trigger

Within Scheduled Tasks in your SIRSTEVEHQ CP account, you'd add/adjust your cron to use WGET.

Create a scheduled task cron job for WP All Import

Don't run the trigger and processing crons at the same time

For example, if you run the processing cron every 5 minutes, don't perform a trigger on the hour, perform the trigger a 2 minutes past the hour to avoid collisions and job locking. The example below shows the trigger and processing crons in place, but timed so that they'll never run at the same time.

Scheduled task menu for cron jobs WP All Import

Ensuring these two optimisations are in place should ensure that WP All Import scheduled tasks complete successfully every time.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How do I migrate a website manually? - SIRSTEVEHQ CP

SIRSTEVEHQ CP provide an automatic 'one click' Migration Centre that supports migrations from the...

Is it safe to update the PHP version on my website? - SIRSTEVEHQ CP

Updating your PHP version on a website can be a critical decision that can affect the...

How do I run a search and replace in the WordPress CLI? - SIRSTEVEHQ CP

The WordPress Command Line Interface (CLI) search and replace function is a useful tool when you...

Why could my WordPress migration fail? - SIRSTEVEHQ CP

The following conditions should be met for the WordPress FTP migration tool to migrate a site....

WordPress caching: what you need to know - SIRSTEVEHQ CP

Optimising your WordPress site for performance can be done in a variety of ways, but few are as...