How to Import REAXML files into Your WordPress Real Estate Website

In this tutorial we are going to walk through the steps of importing REAXML files into your WordPress real estate website. We are going to create one import jobs for each REAXML listing type:

REAXML Listing Types. There are 7 listings types and all are handled by Easy Property Listings:

  • residential = property in Easy Property Listings
  • rental
  • land
  • rural
  • business
  • commercial
  • commercial Land

To do this you are going to need a few tools.

What You Need

Process your REAXML files with FeedSync

Follow this tutorial on how to install and process your REAXML files with FeedSync, you will end up a dynamic URL that you can import your listings from and use these URLS with your WP All Import jobs.

Download, install and configure Easy Property Listings

Using Easy Property Listings with your theme will be much easier as the hundreds of custom REAXML fields are already configured, and we have written custom scripts for pricing, address, features, multiple agents and much more.

Install and activate WP All Import Pro and import the Template

Download a copy of the free  WP All Import scripts and unzip the file on your computer. Next install and activate WP All Import Pro on your WordPress site and from within your dashboard go to All Import > Settings. Under the Saved Templates heading press Choose File, and select the scripts that you unzipped, and press Import Templates.

You should now see the saved scripts.

Import REXML Scripts page - WP All Import

Create your first import job

From your dashboard select, All Import > New Import.

Step 1: Choose Your File

Select the option Download File From URL and paste the FeedSync processed url into the box and press next. It should look something like:

{Your_website_url}/XML/feedsync/?action=do_output&type=residential

Step 2: Select Elements

Here is where you select the residential element for property from the Filtering Options section in the left hand column.

Step 2 WP All Import - Listng Import

When performing your other imports depending on which you have activated. Your real estate site may handle two or three listing types as there are 7 property elements total, but we have to do one at a time.

  • residential
  • rental
  • land
  • rural
  • business
  • commercial
  • commercial_land

Once you are happy with the filtered selection press Next.

Step 3: Template Builder

From this page you are setting the Post Title and the Post Content and you can select the template you imported earlier from the Load existing template, select EPL - REAXML. Press next when you are finished.

Post Title

You are best of using the property address or unique ID with suburb and not the text Heading, Because headings can change several times as agents users tweak and change the descriptive title while managing a leasing or sale. This causes major redirection issues with your site and breaks URLs, e.g. if they link to their listing in an email http://website_url/great-property-by-beach, then they sell it and it becomes http://website_url/great-property-by-beach-under-offer, that link is no longer valid and your re-direction nightmare starts because usually this heading changes 5 times on average.

We know we've had problems with properties not appearing on the sites anymore. Stick with the address or unique id-suburb-state combination.

Post Content

You can add more content to the Post Content box here but shouldn't need to when using Easy Property Listings as all the custom fields are done for you.

Step 3 - import settings - images objects notes

Step 4: Options

So far it's been pretty easy, and using our scripts with WP All Import, it still is... for you!

There are hundreds of options and settings you can tweak here and we will go through them. First select the EPL - REAXML template from the Load existing template selection box to configure the import.

Step 4 WP All Import - Import Settings

This will select the correct custom post type, configures all the custom fields, inserts the features/location taxonomies, sets the image imports, selects the author(s), and configures the import options for you.

Check: Record Matching

This is where the import determines the unique id of the import element.

Sometimes the script template does not set this setting, it's very important to set now as it cannot be changed later.

Use  {uniqueID[1]} for the Automatic Record Matching Unique key. You need to add modTime here because the import will only update listings that have a new date-time. This speeds up the import process especially when there are a few hundred listings in the FeedSync processed REAXML files.

Post Authors

This is a tricky part because there can be two listing agents and they do not have a unique id, plus you can't rely on the email address or phone number as many times they are the same for multiple agents. What you need to do is create a WordPress Author for each agent and make their username first-last in lowercase with a dash.

Primary Post Author

The field has a simple str_relace php function which converts "Merv Barrett" into "Merv-Barrett" by replacing the spaces with dashes. This function is used in author property_agent and property_second_agent custom fields.

[str_replace(" ", "-", {listingAgent[1]/name[1]})]

Press Finish to save the import job.

Step 4 WP All Import - Import Settings

Repeat the process for each listing type you need

Each element requires two import job, one for current and one for sold/leased but they all use the same WP All Import script templates. All you need to change is the Filtering Options Manual XPath rule: /residential, / land, /rental, /rural, commercial, /commercialLand, business; and the source URL from Step 1.

Remember to update your Friendly Name so you know which import is current or sold.

  • EPL - Property
  • EPL - Rental
  • EPL - Land
  • EPL - Rural
  • EPL - Business
  • EPL - Commercial
  • EPL - Commercial Land

If all goes to plan you should have lots of listings in each of your custom post types.

Configure your cron jobs on your cPanel server to run automatically

Once you have created all your import jobs and are happy with how its operating its time to configure your cron jobs. WP All Import needs two cron jobs per import a Trigger Script and Execution Script. You can copy the cron job settings from the imports  Cron Scheduling link.

Manage Imports

Trigger Script

Every time you want to schedule the import, run the trigger script.

To schedule the import to run once every 24 hours, run the trigger script every 24 hours. Most hosts require you to use “wget” to access a URL. Ask your host for details.

Example:

wget -q -O /dev/null "http://your_url/wp-cron.php?import_key=vaOfEXkM&import_id=1&action=trigger"

Execution Script

The Execution script actually executes the import, once it has been triggered with the Trigger script.

It processes in iteration (only importing a few records each time it runs) to optimize server load. It is recommended you run the execution script every 2 minutes.

It also operates this way in case of unexpected crashes by your web host. If it crashes before the import is finished, the next run of the cron job two minutes later will continue it where it left off, ensuring reliability.

Example: 

wget -q -O /dev/null "http://your_url/wp-cron.php?import_key=vaOfEXkM&import_id=1&action=processing"

Adding the cron jobs to cPanel

Log-in to your hosting panel and look for the Cron Jobs icon under the Advanced Tab.

cPanel Cron Jobs

Use the following guidelines when creating your cron jobs.

Trigger Script

It's recommend to process the trigger once per hour at 10 minutes past. Stagger the other Triggers and offset by 10 minutes each so your server is not trying to import all listings at once.

Even if you have a few thousand listings the majority of listings will be skipped and this process completes fairly quickly. Once a change is detected in a listing that listing will be updated with new details. 

Set the EPL - Property import to:

  • Minute: 10
  • Hour, Day, Month, Weekday: *

Set the EPL - Rental import to:

  • Minute: 20
  • Hour, Day, Month, Weekday: *

Set the EPL - Land import to:

  • Minute: 30
  • Hour, Day, Month, Weekday: *

Continue staggering the trigger by 10 minutes for the other imports if you need them.

Example of import set to 3 times per day:

Add new cron job trigger script

Execution Script

Select Every 2-5 minutes (*/2 * * * *) from the common settings. Do this for all the import jobs remembering to change the import_id.

Add New Cron Job

FeedSync Cron Job

You should also add a cron job for FeedSync that runs every 8 minutes (*/8 * * * *) as FeedSync is processing XML files this is a nearly instant process. 

Well that just about covers what you need to do to configure WP All Import to process REAXML files automatically. 

Need help or just want us to configure it for you?

We offer a FeedSync installation service and will take care of the complete setup of imports and cron jobs and will create the FTP accounts so you can focus on building your website.

Installation Service

If you need help installing FeedSync on your WordPress real estate website and would prefer to leave that to us we can take the installation for you.

  • Installation of FeedSync, set-up of dedicated FTP account for REAXML provider (cPanel or similar details required), configuration of 6 import scripts.
  • All you need to do is create an WordPress administrator account for us and provide cPanel or similar details.
  • Includes a license for one website.
  • Configuration of server cron jobs.
  • Support for 30 days.

Order the FeedSync Installation service here.