Imports Aren't Running Automatically
If you've got your import(s) setup but they aren't running automatically it's likely that WordPress cron events are firing. It's also possible that none of WordPress's cron events are firing, not just Property Hive's, so it's worth resolving this. To check this you can:
i) Install the plugin WP-Crontrol.
ii) Navigate to 'Tools > Cron Events'.
iii) If cron events aren't firing you'll see a red warning/error displayed and the reason. Normally this is a server configuration change required such as enabling cURL or similar. An alternative is use Alternative Cron or a Linux cron job.
Getting automated tasks running is not just good for getting the imports running, but also means other WordPress automated tasks are executed as these perform a variety of tasks (clean up old revisions etc).
Imports are Timing Out
The time taken to run an import depends on a number of factors:
- The format being used
- The number of properties
- Is it the first time the import has ran
- The number of new or updated media
The first time an import runs it will always take longer as it needs to import all images and other media for the first time. Subsequent imports will process a lot quicker as as only new or updated media will then be imported.
If an import is timing out you generally have one of three options:
Option 1: Increase timeout settings on the server
There are settings on the server to force a script to cease running after it's been going for, by default, 30 seconds. The most common setting is a PHP setting called max_execution_time. If you're not shared hosting this can normally be increased by your hosting company.
Option 2: Enable background media processing
The reason an import can take so long is primarily due to images and other media being downloaded. As of version 1.2.0 of the Property Import add on you can now choose to queue media downloads so they're processed in the background:
Option 3: Re-run the import manually until complete
If it is the first time you're running the import, and the timeout settings on the server cannot be changed, the only real option is to manually click 'Run Now', wait for the import to timeout, click 'Run Now' again, and so forth until all properties are imported. It will get a bit further each time as media gets imported. Although not the preferred option, some users are on shared hosting where the timeout settings on the server cannot be changed.
Option 4: Store media as URLs
As it's the importing of the photos, floorplans and brochures etc which takes the time, you can choose to store media as URLs instead as opposed to physically downloading them. You can control this under 'Property Hive > Settings > General > Miscellaneous'.
Note that this option is not available if using the Houzez Data Bridge add on or the BLM format.
As mentioned it's only really the first import that will take a significant amount of time. Subsequent imports should complete in a matter of seconds and therefore not have this timeout issue.
Property Types and Other Custom Fields Aren't Getting Mapped
When setting up an import, step 2 will allow you to map all of the custom fields from the third party to the values you have in Property Hive. The list provided is the default list or just a few examples. The client might have customised these further so they could've changed from this list provided.
The logs will show if there are any values received which aren't mapped. It will say for example:
Property received with a type (Office) that is not mapped
In this scenario you can click the blue 'Add Additional Mapping' link during the mapping phase and add any additional options.
Please note: If you update any mappings and have the 'Only Import Updated Properties' setting ticked these, changes will only apply to properties updated going forward.
You'll need to untick this box and run a full re-import for the changes to take effect on existing properties, at which point, the setting can be re-ticked again.
Imports slow down my site and/or server
There are a few things to
1) Change the frequency to run less often
2) Change to a Linux cron job
3) In the import settings you can opt to process the properties in chunks. Maybe try something like 10 records with a 2 second pause
4) Some import formats have a setting to 'only import updated properties' which make it run a lot quicker and therefore have less impact.
Duplicate copies of the images are being imported
Most of the time this is down to the fact you might be using an image optimisation plugin. For some of the formats (i.e. BLM) we check the filesize of the images being received against the filesize of the image we already have on file. If they're the same we assume the image hasn't changed and don't import it again. If they're different we assume it's a new image and import it.
If you're using an image optimisation plugin this will change the filesize of the photos imported so next time an image gets checked it will think it's a new image. You either need to deactivate the image optimisation plugin, or use a plugin which allows you to specify which post types image optimisation should take place against and untick the 'property' post type. We have seen this feature in image optimisation plugins before but can't, at this time, recall which ones. We'll update this documentation as we come across it again.