History
Every import and export is saved in History. You can see what ran, when, how long it took, and what happened.
Page URL: /wp-admin/admin.php?page=wkaie-history
Page title: "Import/Export History" (with a backup icon)
History page — every run with filters, status badges, and actions.
Filter Bar
Five filter controls at the top.
| Filter | Label | Type | Options |
|---|---|---|---|
| 1 | Status | Dropdown | All Statuses, Success, Failed, Running |
| 2 | Entity Type | Dropdown | All Types, Products, Orders, Customers, etc. |
| 3 | From | Date picker | Filter from this date |
| 4 | To | Date picker | Filter up to this date |
| 5 | Search | Text input | Search job title. Placeholder: "Job title..." |
Buttons
- Filter (blue primary button, filter icon) — apply filters
- Reset (gray button) — clear all filters
Summary Line
Above the table, you see: "[X] run(s) found."
History Table
Columns in Exact Order
| # | Column | Width | Shows |
|---|---|---|---|
| 1 | Run ID | 60px | Unique ID for this run |
| 2 | Job Title | — | Name of the job, or "Quick Import" |
| 3 | Entity Type | 100px | Products, Orders, etc. |
| 4 | Status | 90px | Color-coded badge |
| 5 | Records | 240px | Created / Updated / Skipped / Failed counts |
| 6 | Duration | 90px | Total time taken |
| 7 | Images | 110px | Image download status |
| 8 | Started At | 160px | Formatted date and time |
| 9 | Actions | 130px | View Log, Download Log, Rollback |
Status Badge Colors
| Badge | Background | Text Color | Meaning |
|---|---|---|---|
| Success | Light green | Green #00a32a | Ran successfully |
| Running | Light orange | Orange #996800 | Currently running |
| Failed | Light red | Red #d63638 | Error during run |
| Unknown | Light gray | Gray #646970 | Status unclear |
Records Column Display
For successful runs:
Shows color-coded numbers separated by slashes:
- Created (green)
- Updated (blue)
- Skipped (orange)
- Failed (red)
Example: 850 / 120 / 15 / 0
For failed runs that did not start:
Instead of 0 / 0 / 0 / 0, the column shows the error message in red:
"File could not be opened"
Or: "Run did not start"
Click a Row
Click any row to open the run's detail view. You see:
- Summary card: counts, status, duration
- Phase breakdown (time per phase)
- Source info: file name, size, row count
- Target info: entity, mode, match key
- Column mapping used
- Error details (if failed)
- Log preview (first 100 lines)
Each history row drills into this detailed result view with record counts, timings, and a Rollback button.
Action Buttons Per Row
| Button | Icon | When It Appears |
|---|---|---|
| View Log | Media text | Always |
| Download Log | Download | If log file still exists |
| Rollback | Undo (red) | If rollback is available |
Rollback Confirmation
Click Rollback shows this dialog:
"Are you sure you want to rollback this import? This cannot be undone."
Click OK to proceed. See Rollback.
Pagination
At the bottom, if there are multiple pages:
- Total count: "[X] item(s)"
- Page nav: « ‹ [current] of [total] › »
Empty State
If no runs match filters:
"No import/export history found matching your filters."
Log Files
Every run writes a log file to wp-content/uploads/wkaie-logs/.
Log Contents
- Timestamp of each phase
- SQL queries run
- Row-level errors (if any)
- Image download results
- Memory usage
- Total timing
Log Levels
Set in Settings → Performance & Advanced → Log Level:
| Level | What It Logs |
|---|---|
| Error | Only errors |
| Warning | Errors and warnings |
| Info (default) | Normal activity + warnings + errors |
| Debug | Everything including SQL (huge files) |
Log Retention
Old logs auto-delete. Default: 30 days.
Change in Settings → Performance & Advanced → Log Retention (Days).
Download Log
Click Download Log on any run row.
You get a .txt file you can open in any text editor. Useful for support tickets.
Deleting Old History
Auto Cleanup
Based on retention setting in Performance & Advanced tab.
Manual via WP-CLI
# All history older than 30 days
wp wkaie history cleanup --older-than=30d
# Specific job
wp wkaie history cleanup --job_id=42
# Successful runs only (keep failed for investigation)
wp wkaie history cleanup --status=success --older-than=7d
Manual via Admin UI
History page → select rows → Bulk action → Delete.
Audit Trail
Every action is logged:
- Who triggered the run (logged-in user, "Schedule", or "API")
- IP address
- Job
- Timestamp
Useful for compliance (GDPR, SOC 2).
Integration With Dashboard
The Recent Activity feed on the Dashboard shows the last 10 runs. Click to jump to full History.
The Failed (Last 24h) card shows failed count. Click to filter History.
Troubleshooting
| Problem | Fix |
|---|---|
| History page is blank | You have not run any imports yet |
| "Run did not start" for every run | Job is broken before it can start. Check source settings |
| Cannot download log | Log file auto-deleted. Check retention settings |
| Rollback button is gray | Rollback not available (too old or disabled) |
| Log is huge | Log level set to Debug. Change to Info |
Related Pages
- Dashboard — Recent activity at a glance
- Rollback — Undo a run
- Troubleshooting — Fix failed runs
- Settings — Log level and retention
- WP-CLI — Clean up history from command line
