Card Battle Arena
Documentation
Data Safety

Backup Guide

Export cards, story content, and settings as JSON, then import them again safely when you migrate, recover, or test changes.

Backup / Import / Export

The backup tool exports JSON files so you can restore the plugin on the same site or import data into another WordPress install. It covers cards, Story Mode, and general settings.

Export formatJSON files named by backup type and timestamp, such as cba-full-backup-YYYY-MM-DD-HHMMSS.json.
Import behaviorThe importer checks the uploaded JSON, detects the backup type, and restores the matching data sets.

What Each Backup Includes

Backup type Includes Best use
Cards All card rows from the card table, including stats, images, quotes, abilities, and metadata. Move or restore card data without touching settings.
Story Mode Story Mode settings plus every stored story, chapter, script block, media URL, and scene configuration. Back up narrative content before editing chapters or scripts.
Settings acb_settings, acb_ability_settings, and acb_team_bonus_settings. Restore arena configuration, abilities, and team bonus settings.
Full Cards, Story Mode, and Settings together. Site migration, staging copy, or disaster recovery.

How to Export Safely

  1. Open Settings and switch to the Import / Export tab.
  2. Choose the backup type you need: Cards, Story Mode, Settings, or Full.
  3. Save the downloaded JSON file in a safe location.
  4. Keep at least one offline copy before making major edits or updates.
Best practice Export a full backup before redesigning battle rules, changing Story Mode chapters, or moving the site to a new server.

How to Import Again

  1. Open the Import / Export tab.
  2. Choose the JSON file you want to restore.
  3. Submit the import form and wait for the confirmation notice.
  4. Verify cards, story chapters, and settings after the import completes.
Safety checks in code The importer checks permissions, verifies the upload, validates the JSON, auto-detects the backup type, and then restores only the matching sections.

Restore Behavior

CardsRows are updated by ID when possible, or inserted when missing. Card pages are then synced again.
Story ModeStory settings and story data are sanitized and stored back into the Story Mode options.
SettingsGeneral settings, ability settings, and team bonus settings are written back to their options.
PermalinksCard page synchronization runs again so restored cards can keep working with the card page structure.

Backup Checklist

Use staging firstTest important imports on a staging copy before applying them to a live site.
Do not edit casuallyOnly hand-edit JSON when you understand the structure and field names.
Keep version notesRecord the plugin version and site changes that were present when the backup was exported.

What Makes It Safer

Backups are exported as JSON instead of raw database dumps, which makes them easier to move between WordPress installs and easier to inspect at a high level. The import flow also respects WordPress permissions and nonce checks, so only administrators can restore data.