Documentation · System Requirements
PHP and Database Requirements
Introduction
ADP Car Market Hub is a modern PHP 8 plugin that uses namespaces, strict typing in many places and the WordPress database abstraction layer ($wpdb, dbDelta()). It runs on the same PHP and database stack as WordPress itself, but adds its own custom tables for vehicles, analytics events and search alerts, plus file-based logs.
This document describes the PHP language version and extensions, database engine and storage considerations, and the operational implications of imports, logs, leads and analytics.
When to use this document
Use this document when you:
- Configure the PHP runtime for a new WordPress host.
- Audit an existing PHP environment against the plugin's requirements.
- Plan database storage and growth for a dealership site.
- Investigate performance or memory issues during imports or AI generation.
- Need to size the database for analytics retention and lead management.
Overview
The plugin uses the standard WordPress runtime stack:
- PHP language: Requires PHP 8.1+ (set in the plugin header,
readme.txtandcomposer.json). - PHP extensions: Relies on
openssl,curl,mbstring,json, and one ofgd/imagickfor image processing. The System & Help tab also surfacesZipArchivefor export bundles. - Database access: Goes exclusively through
$wpdbwith prepared statements. No direct PDO ormysqliusage. - Custom tables: Created on activation via
dbDelta(); one for vehicle records ({prefix}as24_vehicles), one for analytics events, one for search-alert subscribers. - WordPress tables: Standard
posts,postmeta,term_*,optionsanduserstables are used for theas24ci_carCPT, vehicle taxonomies, plugin settings, leads (a separate CPT) and capabilities. - File-based logs: Written to
wp-content/uploads/as24ci-logs/, not to the database. Rotated at 10 MB with 7-day retention.
Requirements
PHP version
- Minimum (enforced by the plugin): PHP 8.1.
- Recommended: A currently supported PHP 8.x branch (8.2 or 8.3) for the best long-term performance and security posture.
- Not supported: PHP 8.0 or older. The plugin's metadata declares 8.1 as the minimum and the codebase uses 8.1 syntax.
Required PHP capabilities
The plugin's environment check enforces the following at runtime and surfaces the result in the System & Help tab:
opensslextension — outbound HTTPS (AutoScout24 API, managed Gemini endpoint).curlextension — used by the WordPress HTTP API for outbound requests.mbstringextension — multi-byte string handling (mb_strtoloweretc.).jsonextension — encoding/decoding API payloads and option blobs.gdorimagickextension — image attachment processing and optional WebP conversion.ZipArchiveclass — recommended (used for export/download bundles).- A writable
wp-content/uploads/directory for images and logs.
Recommended PHP runtime settings
These are not enforced in code but match the thresholds in the plugin's System & Help tab:
| Setting | Minimum | Recommended | Notes |
|---|---|---|---|
memory_limit | 128 MB | 256 MB+ | < 128 MB is flagged "too low"; 256 MB+ is "good". |
max_execution_time | 30 s | 120 s+ (or 0 = unlimited) | < 30 s is flagged "too low"; 30–60 s "acceptable". |
upload_max_filesize | 8 MB | 16 MB+ | Must comfortably cover one vehicle image. |
post_max_size | 16 MB | 32 MB+ | Should be ≥ upload_max_filesize. |
max_input_vars | 1000 | 3000+ | Mapping and Filters tabs submit many fields at once. |
For WP-Cron and CLI runs, the same limits apply to the PHP CLI / FPM pool that handles the cron job.
OPcache and realpath cache
OPcache is recommended in production. The plugin contains many small classes; OPcache substantially reduces per-request overhead. Use the WordPress-recommended OPcache configuration; no special settings are required.
Database engine
- Required: A WordPress-supported database — MySQL 5.7+ or MariaDB 10.4+ in line with the WordPress recommendation. The plugin does not enforce a stricter version, so this is a recommendation rather than a hard requirement.
- Recommended for production: MySQL 8.0 or MariaDB 10.6+ for better JSON handling, full UTF-8 (
utf8mb4) by default, and improved performance on large tables. - Storage engine: InnoDB. The plugin's
CREATE TABLEstatements rely ondbDelta()and inherit the WordPress charset/collation (typicallyutf8mb4). - Connection: Standard WordPress credentials in
wp-config.php. The plugin uses no separate database connection.
Database storage
The plugin creates and maintains the following data:
- Custom post type
as24ci_car— one WordPress post per vehicle inposts/postmeta, plus taxonomy terms interm_*. - Custom post type for leads — contact-form, test-drive and search-alert leads stored as posts with metadata.
{prefix}as24_vehicles— fast-lookup table with key vehicle attributes (price, currency, hashes used for change detection, etc.).- Analytics events table — page views, filter interactions, contact-open events and lead events with daily aggregation.
- Search-alerts table — saved searches and double-opt-in subscriber records for Smart Stock Alerts.
- Options (
wp_options) — plugin settings under theas24ci_*prefix, plus transients used for the import lock and image queue.
Practical sizing guidance:
- Per vehicle: A few KB in
posts+postmeta+as24_vehicles, plus image attachments (post + attachment metadata). Image binary storage is on disk, not in the database. - Per analytics day: Hundreds of small rows on a quiet site, tens of thousands on a busy one. Plan for periodic pruning if you only need short-term analytics.
- Per lead: A handful of rows (one CPT post + metadata).
Imports
- Imports are batched. The Batch-Wizard adapts batch size between 1 and 5 vehicles per step; cron runs use a configurable maximum vehicles-per-run setting.
- Image downloads are queued and processed asynchronously when "image queue mode" is enabled, so a single PHP request never has to download dozens of images.
- An import lock (transient with a 40-minute TTL) prevents two cron runs from overlapping.
- Re-imports use content and image hashes for change detection, so unchanged vehicles incur almost no database writes.
- Full Sync deletes local cars (and their attachments) that no longer appear in the remote listing — this is a destructive operation, so backups must be in place.
Logs
- Plugin logs live in
wp-content/uploads/as24ci-logs/adp-car-market-hub.log. - The active log is rotated when it exceeds 10 MB (
Logger::MAX_SIZE_BYTES). - Rotated archives older than 7 days are deleted automatically.
- Log writes do not hit the database; disk-only logging keeps imports fast and avoids bloating MySQL.
Leads
- Leads are stored as a dedicated WordPress custom post type with metadata for source (contact form, test drive, search alert), consent status and timestamps.
- Lead volume is normally small relative to vehicles, but each lead represents personal data — see the Privacy, Security and Compliance section for retention guidance.
- CSV export is provided so leads can be moved to an external CRM and pruned from WordPress periodically.
Analytics
- Analytics events are inserted into a dedicated table during normal site usage (page views, filter clicks, contact opens, lead conversions).
- Aggregation queries power the dashboard widget and Analytics tab; they read from this table only.
- For long-running sites, periodic pruning of the events table (for example, keeping only the last 12 months) keeps query times bounded. Do this through a database backup-then-truncate procedure or via your own scheduled job; the plugin does not auto-prune events.
Operational scaling
- The plugin scales linearly with inventory size. The dominant costs are image downloads (network + disk + image library CPU) and analytics writes (database I/O).
- For large dealers (1000+ vehicles), prefer:
- PHP 8.2/8.3 with OPcache.
- 512 MB+ PHP
memory_limit. - External cron triggering
/as24ci/v1/cron-importevery 5–10 minutes. - Object cache (Redis or Memcached) for WordPress.
- MySQL 8 / MariaDB 10.6+ on dedicated resources.
- For small dealers (< 100 vehicles), the WordPress baseline (256 MB memory, 120 s execution time) is more than sufficient.
Recommended production setup
- PHP 8.2 or 8.3 (PHP-FPM) with OPcache enabled.
memory_limit = 256M(or 512M for large inventories),max_execution_time = 300,max_input_vars = 3000.- All required extensions installed:
openssl,curl,mbstring,json,gdorimagick, plusZipArchive. - MySQL 8.0 or MariaDB 10.6+ with
utf8mb4charset and InnoDB storage. - Daily database backups including the plugin's custom tables.
- Periodic pruning of analytics events and exported leads if you have multi-year retention concerns.
- Object cache (Redis or Memcached) on busy sites.
Operational notes
- All database access goes through
$wpdbwithprepare(), so the plugin inherits WordPress's prepared-statement protections. - The custom tables are created and migrated through
dbDelta()on plugin activation and capability-version upgrades. Manual schema edits are not required. - The plugin does not store the AutoScout24 client secret in source files; it is saved as a WordPress option. Treat database backups as containing sensitive data. The managed Gemini API key used by the AI assistant is configured by AD Promotion in
AS24CI\Ai_Config(a PHP constant) and is not stored as a WordPress option. - The System & Help tab in WordPress admin reproduces every PHP and extension check listed above with live values from the running site.
- Switching PHP versions or extensions on the host requires no plugin reconfiguration — re-check the System & Help tab after the change.
Troubleshooting
- "Requirements not met" in the System & Help tab: Identify the missing item (PHP version, missing extension, low memory) and adjust the PHP runtime accordingly.
Allowed memory size of … bytes exhaustedduring imports: Raisememory_limitto 256 MB or 512 MB and lower the per-cron vehicle batch size.- Imports stall at "image processing": Confirm GD or Imagick is installed and that the uploads directory is writable; check the plugin log file for image-specific errors.
Maximum execution time of … seconds exceeded: Raisemax_execution_timefor the FPM pool used by cron, and prefer the image queue over inline image downloads.- Custom tables missing after a manual database restore: Deactivate and reactivate the plugin to re-run the
dbDelta()upgrade routine. - Plugin log directory growing unexpectedly: Verbose logging may be enabled; disable it in the Automation/Logs tab once the issue is diagnosed. Rotation still applies, but verbose mode produces many entries per vehicle.
- Analytics queries slow on very large sites: Prune older events (after backing up) and ensure the database server has enough buffer pool / RAM.