Documentation · User Handbook

Vehicle Import Workflow

This document describes how to import vehicle listings into WordPress using the ADP Car Market Hub plugin. Live sources (the AutoScout24 API, mobile.de or carcuro), an automatic feed, an e-mail inbox and one-off file uploads are all connected on the central Connections page (CMH Center → Connections); running and scheduling imports stays under Import & Limits, and managing imported and pending vehicles stays under Car Importer. This document 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 a connected live source — the AutoScout24 API, mobile.de or carcuro — for all configured seller IDs and stores each listing as a WordPress post of the custom post type as24ci_car. (Feed, e-mail and file-upload sources are also available; see the Connections Reference.) 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

  • A live source must be connected on CMH Center → Connections before any import can run. For AutoScout24 this means valid API credentials (API Base URL, Seller ID(s), Client ID, Client Secret); for mobile.de this means valid API credentials (API user name, API password, optional Customer number); for carcuro it means a valid carcuro company token. (Earlier versions configured the AutoScout24 connection under Settings; all data-source credentials now live on the Connections page.) The secrets you enter are stored encrypted at rest.
  • The WordPress site must be able to make outbound HTTPS connections to the configured source.
  • For image imports, the WordPress uploads directory must be writable.
  • For AutoScout24, 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

Connecting a live source (AutoScout24, mobile.de or carcuro)

Before any import can run, connect a source on the central Connections page. Uploading a one-off file from your dealer software (DMS) happens on the same page.

  1. Navigate to CMH Center → Connections.
  2. Click the row for the source you want to connect: - AutoScout24 — enter the API Base URL, Seller ID(s), Client ID and Client Secret. - mobile.de — enter your API user name and API password (both stored encrypted), an optional Customer number, and use the Sandbox (test environment) toggle if you are connecting to the mobile.de test environment. mobile.de works exactly like carcuro: its columns are mapped automatically (no manual mapping), it imports and syncs on the central schedule, new vehicles appear, and vehicles removed at mobile.de are removed here. - carcuro — enter your carcuro company token and choose which vehicles to sync (Available / All / Sold). carcuro works exactly like AutoScout24: its columns are mapped automatically, new vehicles appear, and vehicles removed at carcuro are removed here. It makes no difference whether the dealer uses AutoScout24, mobile.de or carcuro — every setting applies to the whole inventory.
  3. Save the source. The status pill on the right turns to Connected, and the secrets you entered are stored encrypted at rest.
  4. Set how often imports run under Import & Limits (see below) — a single central schedule drives every connected source.

For the feed, e-mail and file-upload sources, and the full per-field reference, see the Connections Reference.

Importing a single vehicle

  1. Navigate to CMH Center → 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 at your live source), 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 CMH Center → Import & Limits.
  2. Click the Start Import 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 CMH Center → 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 at the source (for example, a price change or new images on AutoScout24, mobile.de or carcuro), 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 on Import & Limits → Import Defaults, the importer downloads vehicle images from the API and attaches them to the WordPress post.
  • Max images per vehicle (Import & Limits → Import Defaults) 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 on Import & Limits → Import Defaults 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 source 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 source (AutoScout24, mobile.de or carcuro) exactly.
  • Full Sync deletions are recorded in the plugin log with sync_deleted counts.
  • When Full Sync is disabled, vehicles removed at the source remain in WordPress until deleted manually.

When a vehicle is permanently deleted — whether by Full Sync, by a manual Delete Permanently, or by a bulk delete — its detail page URL (for example https://your-site.tld/cars/bmw-320i-2019/) no longer exists. Search engines may still have that URL indexed, and customers may have bookmarked or shared it.

Instead of showing those visitors a "404 – page not found" error (a dead end that looks unprofessional for the dealership), the plugin automatically redirects the old URL to a pre-filtered search for the same make and model, for example https://your-site.tld/cars/?make=bmw&model=320i. The visitor immediately sees the closest still-available vehicles rather than an error page.

The redirect is smart about what it points to, always against your current inventory:

  • If you still have matching vehicles of that make and model, the visitor lands on that filtered result.
  • If not, it falls back to all vehicles of that make.
  • If that brand is gone entirely, it falls back to the full vehicle list.

Because the target is always a live search (never another specific vehicle), there are never broken or chained redirects, no matter how often your stock changes. The behaviour is controlled by the Redirect removed vehicles toggle in Settings (on by default) and only ever affects URLs that would otherwise return a 404, so it is safe to leave enabled.

Vehicle post status

Imported vehicles are created with the post status configured in Import & Limits → Import Defaults → 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 URLConnectionsAutoScout24 API endpoint (must include https://)
Seller ID(s)ConnectionsComma-separated seller/dealer identifiers (AutoScout24)
Client IDConnectionsOAuth client ID for the AutoScout24 API
Client SecretConnectionsOAuth client secret for the AutoScout24 API (stored encrypted at rest)
API user nameConnectionsmobile.de API user name
API passwordConnectionsmobile.de API password (stored encrypted at rest)
Customer numberConnectionsOptional mobile.de customer number
Sandbox (test environment)ConnectionsConnect mobile.de to its test environment
carcuro company tokenConnectionsCompany token for the carcuro live source (stored encrypted at rest)
Default post statusImport & Limits → Import DefaultsPost status applied to newly imported vehicles (publish or draft)
Import imagesImport & Limits → Import DefaultsEnable or disable image downloading during imports
Max images per vehicleImport & Limits → Import DefaultsMaximum images downloaded per listing (0 = unlimited)
Convert to WebPImport & Limits → Import DefaultsConvert downloaded images to WebP (requires GD or Imagick)
WebP qualityImport & Limits → Import DefaultsCompression 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

  • One central schedule: a single schedule under Import & Limits drives every connected source. AutoScout24, mobile.de and carcuro have no interval of their own; the feed and e-mail sources additionally offer their own interval. A manual import can always be run.
  • Multiple seller IDs: for AutoScout24, 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 Start Import 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 CMH Center → 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 ImporterThe source credentials are incorrect, or the source is unreachableVerify the source on Connections (its status pill should read Connected); 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 Import & Limits → Import Defaults; 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 Import & Limits → Import Defaults → 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 at the source (AutoScout24, mobile.de or carcuro)Check 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