Documentation · User Handbook

Vehicle Import Workflow

This document describes how to import vehicle listings from the AutoScout24 API into WordPress using the ADP Car Market Hub plugin. It covers both manual import methods and the automatic scheduled import, as well as import options, change detection, image handling, and Full Sync.

When to use this document

Read this document if you:

  • Need to perform or monitor a vehicle import for the first time or on demand.
  • Want to understand the difference between manual import, Batch-Wizard, and scheduled (automatic) import.
  • Are troubleshooting import failures or unexpected results.
  • Need to understand how the plugin handles updated listings, images, and removed vehicles.

For a concise daily check of import status, see Daily Usage Workflows.


Overview

The plugin fetches vehicle listings from the AutoScout24 API for all configured seller IDs and stores each listing as a WordPress post of the custom post type as24ci_car. Vehicle metadata (price, mileage, specifications, equipment, images) is stored in post meta and a dedicated custom database table.

There are three ways to trigger an import:

  1. Single vehicle import — import or re-import one listing from the Car Importer tab.
  2. Batch-Wizard — manually run a full import of all listings with live progress monitoring. Suitable for the initial import or a forced full refresh.
  3. Automatic scheduled import — runs at a configured interval via WP-Cron or an external server cron. The recommended method for ongoing synchronisation.

All three paths use the same underlying import logic: connect to the API, fetch listings for each configured seller, compare with the local copy using content hashes, and create or update WordPress posts as needed.


Requirements or prerequisites

  • Valid API credentials (API Base URL, Seller ID(s), Client ID, Client Secret, Token URL, and Audience) must be entered and saved in ADP Car Market Hub → Settings before any import can run.
  • The WordPress site must be able to make outbound HTTPS connections to the configured API endpoint.
  • For image imports, the WordPress uploads directory must be writable.
  • At least one Seller ID must be configured. The plugin reads the as24ci_seller_ids option (comma-separated list of IDs).

Step-by-step instructions

Importing a single vehicle

  1. Navigate to ADP Car Market Hub → Car Importer.
  2. The Pending vehicles table lists listings available from the API that have not yet been imported into WordPress.
  3. Find the vehicle you want to import.
  4. Click Import next to the listing.
  5. The page reloads and the vehicle appears in the Imported vehicles table above.
  6. To refresh an already-imported vehicle (for example, after a price change on AutoScout24), find it in the Imported vehicles table and click Re-import.

Running the Batch-Wizard (manual full import)

The Batch-Wizard is the recommended method for the initial full import of all listings and for performing a forced refresh outside the regular schedule.

  1. Navigate to ADP Car Market Hub → Import & Limits.
  2. Click the Trigger now button.
  3. The Batch-Wizard starts and displays a live progress bar showing: - Total vehicles to process. - Vehicles processed so far. - Estimated remaining time. - Current action (inserting, updating, or skipping).
  4. The wizard processes one vehicle at a time by default (adaptive batch size: 1–5 vehicles per step). This avoids PHP execution time errors on shared hosting.
  5. Use the Pause button to temporarily suspend the import. Click Resume to continue.
  6. Use the Abort button to stop the import. Vehicles already processed in the current run remain in WordPress.
  7. After the wizard finishes, a summary shows the number of vehicles inserted, updated, skipped, and any errors.

Configuring and running scheduled automatic imports

For ongoing synchronisation, enable the automatic scheduler:

  1. Navigate to ADP Car Market Hub → Import & Limits.
  2. Enable Automatic import (the checkbox or toggle on the tab).
  3. Choose the import interval: - Hourly - Every 6 hours - Twice daily - Daily - Custom (minimum 15 minutes — configure the minute value in the custom interval field)
  4. For daily and twice-daily schedules, optionally set the start time.
  5. Save the automation settings.
  6. WordPress WP-Cron will now trigger imports at the configured interval whenever the site receives traffic.

For production sites, server cron is recommended:

  1. Set Cron mode to Server cron on the Import & Limits tab.
  2. Copy the displayed cron endpoint URL (the URL includes a security token).
  3. Add a server-side cron job (for example, via crontab) calling the endpoint URL using curl or wget at your desired interval.
  4. If you regenerate the token (Import & Limits → Regenerate token), update your cron job with the new URL.

How imports work

Change detection

The importer calculates and stores a content hash and an image hash for each imported vehicle. On subsequent import runs, a vehicle is skipped if neither hash has changed. This keeps import runs fast, especially for large inventories where most vehicles are unchanged.

When a listing is updated on AutoScout24 (for example, a price change or new images), the hashes no longer match and the vehicle is updated in WordPress.

Import outcome codes

Each vehicle processed during an import run is counted in one of four categories:

OutcomeMeaning
InsertedNew vehicle post created in WordPress
UpdatedExisting vehicle post refreshed with new data
SkippedVehicle data unchanged; no action needed
ErrorA problem occurred for this vehicle (see Logs tab)

The import summary on the Import & Limits tab and Batch-Wizard displays these counts after each run.

Image import and the image queue

  • When Import images is enabled in Settings, the importer downloads vehicle images from the API and attaches them to the WordPress post.
  • Max images per vehicle (Settings) limits how many images are downloaded per listing (0 = unlimited).
  • Image queue mode (enabled by default for cron/REST imports): during scheduled imports, only the first image per vehicle is downloaded immediately. All remaining images are added to a persistent background queue and processed asynchronously by the image queue worker, which runs approximately every 5 minutes. This prevents PHP execution timeout errors during large imports.
  • The image queue worker processes up to 30 images per batch.
  • The current queue size and worker status are visible on the System & Help tab.
  • To process the image queue immediately, click Run image queue now on the System & Help tab.
  • WebP conversion: if enabled in Settings and GD or Imagick is available, images are converted to WebP format upon download. The quality level is configurable (1–100, default 80).

Import lock

The plugin uses a transient-based run-lock with a TTL of approximately 40 minutes. If an import run is already in progress when a second trigger arrives (from WP-Cron, server cron, or a manual button), the second trigger is skipped and a "already in progress" message is logged. If the lock is stale (older than the TTL), it is automatically cleared so the next run can proceed.

Full Sync

When Full Sync is enabled on the Import & Limits tab, the importer compares the set of listing IDs returned by the API against all vehicle posts in WordPress. Any local post whose listing ID is not in the current remote listing is permanently deleted — including all attached images.

  • Enable Full Sync only when you want the WordPress inventory to mirror the live AutoScout24 listing exactly.
  • Full Sync deletions are recorded in the plugin log with sync_deleted counts.
  • When Full Sync is disabled, vehicles removed from AutoScout24 remain in WordPress until deleted manually.

Vehicle post status

Imported vehicles are created with the post status configured in Settings → Default post status (publish or draft). When a vehicle is updated by a subsequent import run, its post status is not changed — a published post remains published.


Configuration reference

SettingLocationDescription
API Base URLSettingsAutoScout24 API endpoint (must include https://)
Seller ID(s)SettingsComma-separated seller/dealer identifiers
Client IDSettingsOAuth client ID for the API
Client SecretSettingsOAuth client secret for the API
Default post statusSettingsPost status applied to newly imported vehicles (publish or draft)
Import imagesSettingsEnable or disable image downloading during imports
Max images per vehicleSettingsMaximum images downloaded per listing (0 = unlimited)
Convert to WebPSettingsConvert downloaded images to WebP (requires GD or Imagick)
WebP qualitySettingsCompression quality for WebP conversion (1–100)
Auto import enabledImport & LimitsEnable the WP-Cron automatic import schedule
Import intervalImport & LimitsSchedule frequency (hourly, 6h, twice daily, daily, custom)
Cron modeImport & LimitsWP-Cron (default) or server cron
Max vehicles per cron runImport & LimitsLimit the number of vehicles processed per scheduled run (0 = unlimited)
Image queue (cron)Import & LimitsEnable background image queue mode for cron/REST imports
Full SyncImport & LimitsDelete local vehicles not found in the current remote listing

Operational notes

  • Multiple seller IDs: the importer runs separately for each configured seller ID. An error for one seller does not stop imports for other sellers.
  • Cron robustness: the import runner raises the PHP execution time limit to 300 seconds during cron/REST-triggered runs. On hosting environments that restrict set_time_limit(), this may not take effect.
  • Batch-Wizard batch size: the wizard adapts its batch size (1–5 vehicles per step) to stay within safe execution time boundaries.
  • Manual trigger during active cron: if the automatic cron is running when you click Trigger now, the manual trigger will be skipped due to the run-lock. Wait for the current run to complete or clear the lock.
  • Import log: all import events (API calls, inserted/updated/skipped/error per vehicle, image downloads) are written to the plugin log. Review ADP Car Market Hub → Logs for details.
  • Verbose logging: if enabled, the log includes per-vehicle and per-image detail. Disable in production to reduce log growth.

Troubleshooting

SymptomLikely causeCheck
No listings appear in the Car ImporterAPI credentials are incorrect or the API endpoint is unreachableVerify credentials in Settings; run connection test on System & Help
Import runs but no new vehicles appearDefault post status is draft, or all listings were already imported and unchangedCheck post status in Settings; check the import summary for "skipped" counts
Images are not downloadingImage import is disabled, uploads directory is not writable, or the image queue worker is not runningCheck Settings → Import images; check System & Help for uploads status and queue size
Scheduled import does not runWP-Cron is disabled or the site has no trafficSwitch to server cron or verify the cron endpoint is reachable
Import shows many errorsAPI rate limiting, network issues, or malformed listing dataReview the Logs tab for error details; check API status with your integration partner
Vehicles disappear unexpectedlyFull Sync is enabled and the vehicles were removed from AutoScout24Check Logs for sync_deleted entries; disable Full Sync if unintended
Batch-Wizard stops or times outPHP execution time limit is too lowCheck System & Help for execution time value; contact your hosting provider
Import lock prevents runsA previous import run died without releasing the lockWait up to 40 minutes for the lock to expire automatically, or check Logs for details