Run WordPress Export on a Schedule

Run WordPress Export on a Schedule

The Automatic Scheduling service allows you to set up exports with just a couple of clicks. Rather than setting up cron jobs on your server, you can set schedules directly within WP All Export. The Automatic Scheduling service will then contact your site at the scheduled time to run your exports, and check in to make sure they've completed correctly.

Automatic Scheduling vs Manual Scheduling

WP All Export offers two ways to schedule or automate exports. The first option is to manually create the cron jobs in the server. The second option is to use our paid Automatic Scheduling Service, which is integrated within WP All Export and doesn't require any setup.

This guide focuses on Automatic Scheduling.

Configure a Scheduled WordPress Export

To set up the Automatic Scheduling Service on an existing export, navigate to the Manage Exports page. Then, click on Scheduling Options › Automatic Scheduling:

The same Scheduling Options menu appears when creating a new export.

There you decide whether you'd like your export to run weekly or monthly. Then you select the days and times that you would like your export to run.

Sign Up for Automatic Scheduling

This service costs $9 USD per month, and allows for unlimited exports to run on an unlimited amount of sites. Subscribe to the Automatic Scheduling service.

Manual Record Matching

Manual Record Matching

WP All Import can import data to posts that already exist on your site, even if they were manually created instead of imported by WP All Import.

You need something in your import file that WP All Import can use to 「match」 the 「records」 in your import file to the posts that already exist on your site – that』s why it』s called Manual Record Matching.

When importing into existing records, you can specify which data WP All Import will update or overwrite, and which will be left alone.

Follow along with the below example to get a complete understanding of how to import data into existing posts on your site.

Example – Updating Multiple Property Listings With New Prices

I have a few property listings with outdated prices.

Example Properties

I have a CSV file with the MLS numbers of the properties, and the new prices.

CSV File

I』ve entered the MLS number of each property in my theme, so we can use the MLS number as the 「matcher」 so that WP All Import knows which price should be assigned to which property.

MLS Number

To do the import, upload your CSV in Step 1, and choose Existing Items.

Step 1 Existing Items

Continue to Step 2 and then to Step 3. In Step 3, set the price Custom Field to the price from your file.

Setting the price

The only field we want to import data to is the price. So just leave all the other fields blank. WP All Import will warn you that your post title and content are blank, but that』s fine – you can continue anyway. We don』t want to update the title or content here, just the price.

Now it』s time for the most important part – telling WP All Import how to match the records in our CSV file with the existing property listings already on our site. We』re going to match by the MLS number – since we have the MLS number in both places – on our site, and in our file.

Choose 「Match by Custom Field」 and click in the Name box to see a dropdown list of Custom Fields available to match by. Then choose 「mls_value」 – the Custom Field name the theme uses internally for the MLS field.

Record Matching

Then drag & drop the MLS column in your CSV file to the Value textbox.

MLS Value

Now, for each record in your file, WP All Import will look for a property on your site with an mls_value Custom Field that equals {mlsno[1]} from your file, and then import the price to it.

To ensure WP All Import only imports the price, and doesn』t overwrite the title, content, and other fields we left empty with blank values, we specify which data points we wanted updated, and which we want ignored.

Choose which data to update

Here』s the result after running the import – our 3 posts were updated with the new prices.

Import Summary

Data Updated

Scheduling Imports Using Cron Jobs

Scheduling Imports Using Cron Jobs

Each time the cron is run, WP All Import will download your XML or CSV file from the specified URL and update, delete, and create posts on your site according to your settings.

To set up a recurring import using cron jobs, specify the URL to your XML or CSV file on the Import Settings page.

Then, visit the Scheduling Options link on the Manage Imports page to open the Scheduling Options Popup.

You will need to choose the 「Manual Scheduling」 option here:

Manual Scheduling

Each import has two cron URLs – a trigger URL, and a processing URL.

The trigger URL will look something like this:http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=trigger

The processing URL will look something like this:http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=processing

You can find your secret key on the All Import -> Settings screen, and the import ID on the Manage Imports screen.

If you want to run your import every 24 hours, you should run the trigger URL every 24 hours. If you want to run your import once per week, you should run the trigger URL every week.

The processing URL should be run every two minutes because it may not finish your import in one run. The reason is that many hosts have maximum script execution times in place, so its only possible for the processing script to finish only a small percentage of your import before it is timed out.

If this is the case and the processing script is run again after two minutes, it checks to see if your import is finished, or if there』s still work to be done. If there』s work to be done, it will import posts for as long as it can, or two minutes, whichever is longer.

Then, on the next run of the processing script, it will see if more work needs to be done on the import – and if so, it will do it. If not, it will 「untrigger」 the import. And now the processing script will have no effect until the import is triggered again by the next run of the trigger script.

Setting Up Cron Jobs

The instructions for setting up cron jobs vary across hosts. Commonly, you can do it in your web hosting control panel.

To create a cron job that hits the cron URLs, commonly the wget command is used. Examples are on the Manage Imports -> Cron Scheduling screen of WP All Import.

Below are a few cron command examples (not all options work with all hosts, ask your host for help as needed):

wget --spider "http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=trigger&rand="$RANDOM

wget -q -O - "http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=trigger&rand="$RANDOM

curl "http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=trigger&rand="$RANDOM

lynx "http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=trigger&rand="$RANDOM

To ask your web hosting provider to set up the cron for you, use this e-mail template:

Hi Support,

Please set up two cron jobs.

CRON JOB 1Fetch this URL every 24 hours: http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=trigger

CRON JOB 2Fetch this URL every 2 minutes: http://YOUR-WEBSITE.com/wp-load.php?import_key=[YOUR_SECRET_KEY]&import_id=[YOUR_IMPORT_ID]&action=processing

Thanks,Your Name

If your web host doesn』t have a cron feature, you can use an external service like EasyCron.

Call Cron URLs from the Command Line

You can call the WP All Import and WP All Export cron URLs from the command line. This may be necessary if your site's configuration won't allow inbound calls to the regular cron URLs.

It'd look something like this:

/path/to/your/php-cgi /path/to/yourwordpressinstall/wp-load.php import_key=ABC123 import_id=5 action=trigger
/path/to/your/php-cgi /path/to/yourwordpressinstall/wp-load.php import_key=ABC123 import_id=5 action=processing

Note: The php-cgi binary must be used or the parameters won't be passed correctly.

Migrate

Migrate

Migrating data between sites is possible using the integration between WP All Export and WP All Import. You can migrate posts, pages, WooCommerce products, orders, and custom post types from any theme or plugin.

Step 1: Select What You Want to Export

You must first decide which post type or taxonomy you want to migrate. You'll see all of the available options in the dropdown at the start of a new export.

Step 2: Decide Which Data to Migrate

The fields available to export are listed on the right. Drag over those you want or click 'Add All' to include everything.

Step 3: Confirm & Run Export

Run the export.

Step 4: Download the Export Bundle

Download the export bundle ZIP file using the 'Bundle' button. Don't unzip the archive.

Step 5: Upload Export Bundle to WP All Import

Start a new import at All Import > New Import on your destination site. Then upload the ZIP archive you downloaded from WP All Export.

Step 6: Skip to Step 4

The export bundle automatically configures the import, allowing you to skip straight to Step 4.

Step 7: Confirm & Run Import

Step 4 shouldn't need any changes, just click Continue. Then run the import.

Bulk Edit

Bulk Edit

You can quickly bulk edit posts using WP All Import and WP All Export along with your favorite spreadsheet program (Excel, Numbers, etc). The data is first exported with WP All Export. Then make your changes and upload it with WP All Import.

Step 1: Select What You Want to Export

You must first decide which post type or taxonomy you want to edit. You'll see all of the available options in the dropdown at the start of a new export.

Step 2: Decide Which Data to Edit

You'll see all of the data available to export on the right. Drag over the fields you need to edit and they'll be included in the export file. Certain fields are required depending on the post type being exported, you'll see a message if you're missing any of those.

Step 3: Confirm & Run Export

Run the export.

Step 4: Download Export File

Once the export completes you'll need to download the generated CSV file.

Step 5: Update the Exported Data

Using the program of your choice open the export file and make any updates necessary. Don't remove any columns or data will be missing after the import runs.

Step 6: Generate a New Import

Using the 'Import with WP All Import' button will start the creation of a new import. This option automatically configures the import settings for you. Your import will be created based on the fields you set when exporting.

Step 7: Upload the Updated File

Choose the option to 'Upload a file' and select the CSV you just modified. Your file will be uploaded and you'll be taken directly to Step 2 of the new import.

Step 8: Review the Data to Update

Here the data to be updated is already mapped to the appropriate import fields. You can take a look at what was mapped, or just continue to Step 4.

Step 9: Review the Data to Update

Here you can modify what data to update when the import runs. Usually, it shouldn't be changed.

Step 9: Confirm & Run Import

Now it's time to run your import.

Yoast WordPress SEO

Yoast WordPress SEO

In this tutorial you』ll learn how to import posts into WordPress along with their settings for the Yoast WordPress SEO plugin. WP All Import makes it easy to import into almost any plugin or theme.

You can complete this import manually, as described below, or you can use the Yoast Add-On for WP All Import: https://wordpress.org/plugins/yoast-seo-settings-xml-csv-import/

The settings for Yoast are stored in Custom Fields attached to every post. Watch the video tutorial below to see how easy it is to import these settings:

Just like importing other Custom Fields, you can manually enter the field name into WP All Import or you can choose to have WP All Import auto detect all of the Custom Fields attached to the post type you』re importing to. Remember, in order for WP All Import to detect these Custom Fields there must be at least one post on your site using them.

Yoast uses thirteen different Custom Fields to store settings for your posts. If you don』t import a value to a Custom Field then Yoast WordPress SEO will simply assign your post the default for that field.

NameCustom FieldValuesFocus Keyword_yoast_wpseo_focuskwText stringSEO Title_yoast_wpseo_titleText stringMeta Description_yoast_wpseo_metadescText stringMeta Robots Index_yoast_wpseo_meta-robots-noindexBlank for default, 1 for noindex, or 2 for indexMeta Robots Follow_yoast_wpseo_meta-robots-nofollowBlank for follow, 1 for nofollowMeta Robots Advanced_yoast_wpseo_meta-robots-advBlank for default, none, noodp, noydir, noimageindex, noarchive, or nosnippetInclude in Sitemap_yoast_wpseo_sitemap-includeBlank for auto, always, or neverSitemap Priority_yoast_wpseo_sitemap-prioBlank for auto, 1 to .1Canonical URL_yoast_wpseo_canonicalCanonical URL of post301 Redirect_yoast_wpseo_redirectURL to redirect post toFacebook Title_yoast_wpseo_opengraph-titleText stringFacebook Description_yoast_wpseo_opengraph-descriptionText stringFacebook Image_yoast_wpseo_opengraph-imageURL to imageTwitter Title_yoast_wpseo_twitter-titleText stringTwitter Description_yoast_wpseo_twitter-descriptionText string

Here』s an example of how your import template might look while importing Yoast WordPress SEO settings:

Yoast Custom Fields

Importing SEO data for Taxonomies

Yoast stores taxonomy SEO data via the Options API, so the Term Meta section won』t work – instead, you』ll need to use our add-on for Yoast: https://wordpress.org/plugins/yoast-seo-settings-xml-csv-import/. In the import settings, you』ll still use the term meta section to decide which fields to update. Here are all of the available taxonomy fields:

NameCustom FieldValuesFocus Keywordwpseo_focuskwText stringSEO Titlewpseo_titleText stringMeta Descriptionwpseo_descText stringMeta Robots Indexwpseo_noindexBlank for default, 1 for noindex, or 2 for indexInclude in Sitemapwpseo_sitemap_includeBlank for auto, always, or neverCanonical URLwpseo_canonicalCanonical URL of postFacebook Titlewpseo_opengraph-titleText stringFacebook Descriptionwpseo_opengraph-descriptionText stringFacebook Imagewpseo_opengraph-imageURL to imageTwitter Titlewpseo_twitter-titleText stringTwitter Descriptionwpseo_twitter-descriptionText stringTwitter Imagewpseo_twitter-imageURL to image

Overview

Overview

WP All Export turns your WordPress data into a custom CSV file. Then, WP All Import saves that data to your new site. First, select what you want to export. You can export posts, pages, WooCommerce products, orders, and custom post types from any theme or plugin.

Next, you download the 'Bundle' that's provided on the export complete screen. Upload that bundle on Step 1 of a new import to automatically configure it. After the import runs your data will be saved on the destination site.

Importing Images From Your Computer

Importing Images From Your Computer

If you have the images you wish to import on your computer/localhost, you』ll need to upload these images online first, before WP All Import can import them.

The easiest way to do this is create a folder on your website called 「images」, and then upload all the images to this folder – i.e. http://your-site.com/images/

Then follow the normal procedure for importing images from a URL.

If you have a .zip/.gz/.gzip file containing your XML and CSV file and all associated images, you can』t import this file directly – you need to first unzip it, get the images out, and upload them somewhere so that WP All Import can import them.

Repeatable Groups

Repeatable Groups

Our Toolset Types Add-On provides multiple methods to import repeatable groups in an effort to accommodate as many file formats as possible.

Note: currently, we do not support appending repeater data from multiple import records into a single post. All of the repeating data for a single post needs to be in the same post record.

Fixed Repeater Mode

If you're using a CSV file with a fixed amount of columns for your repeating data, like this:

Toolset Types Fixed CSV Mode

Then you'd want to use "Fixed Repeater Mode" and add a row for each column that you plan on dragging in:

Toolset Types Add Row View

If it's possible that some of the columns won't have data for some records, you can enable the "Ignore blank fields" option to avoid adding empty rows.

Variable Repeater Mode (XML)

If you're importing an XML file and the repeating data is listed in sibling elements:

https://www.example.com/image1.jpg
https://www.example.com/image2.jpg
https://www.example.com/image3.jpg
https://www.example.com/image4.jpg
https://www.example.com/image5.jpg

Then you should use the Variable Repeater Mode (XML) option like this:

Toolset Types Variable Repeater Mode XML View

You'll notice that the syntax from the screenshot doesn't match what you'll see whenever you drag in the import elements. This is because you have to manually edit the XPath to make sure the loop is reaching the correct elements. You can learn more about this here in our Custom XPath and FOREACH Loops documentation pages.

Variable Repeater Mode (CSV)

If your repeating data is in a single CSV column with a delimiter, for example:

Toolset Types Variable Repeater Mode CSV View

Then you'll want to use the "Variable Repeater Mode (CSV)" option and make sure to choose the correct delimiter:

Toolset Types Variable Repeater Mode CSV Import View

Just like the "Fixed Repeater Mode", you can enable the "Ignore blank fields" option if some records have more or less repeating data.

Run WordPress Import on a Schedule

Run WordPress Import on a Schedule

The Automatic Scheduling service allows you to set up imports with just a couple of clicks. Rather than setting up cron jobs on your server, you can set schedules directly within WP All Import. The Automatic Scheduling service will then contact your site at the scheduled time to run your imports, and check in to make sure they've completed correctly.

Automatic Scheduling vs Manual Scheduling

WP All Import offers two ways to schedule or automate imports. The first option is to manually create the cron jobs in the server. The second option is to use our paid Automatic Scheduling Service, which is integrated within WP All Import and doesn't require any setup.

This guide focuses on Automatic Scheduling.

Configure a Scheduled WordPress Import

To set up the Automatic Scheduling Service on an existing import, navigate to the Manage Imports page. Then, click on Scheduling Options › Automatic Scheduling:

The same Scheduling Options menu appears when creating a new import.

There you decide whether you'd like your import to run weekly or monthly. Then you select the days and times that you would like your import to run.

Sign Up for Automatic Scheduling

This service costs $9 USD per month, and allows for unlimited imports to run on an unlimited amount of sites. Subscribe to the Automatic Scheduling service.