The Import / Export tool lets you move your FotoGrids data between WordPress sites or keep a portable backup of your Galleries, Albums, items, tags, settings, statistics, and templates. Exports are saved as standard JSON or XML files that you can store, share with a developer, or reimport on any FotoGrids installation.
Location FotoGrids → Tools → Import / Export
Exporting Your Data #
What can be exported
A single export file can include any combination of the following data types:
- Galleries — Gallery posts, their settings, and all post meta
- Albums — Album posts and their settings
- Gallery–Album relationships — which Galleries are assigned to which Albums, and in what order
- Items — all item-level data per Gallery (captions, descriptions, positions, external URLs, EXIF, custom data)
- Tags, People & Locations — the tag library (all three metadata types)
- Item metadata — the joins between items and their tags, people, and locations
- Settings — plugin-wide settings (media settings, gallery defaults, autosave, and a small number of global options)
- Statistics — view and share counts for Galleries, Albums, and items
- Templates — saved Gallery templates, per user
By default, all data types are included. You can deselect any types you do not need before downloading.
Export format
Exports are available as JSON (default) or XML. Both formats contain identical data — choose whichever is easiest to work with for your use case. JSON files are generally more compact and easier to inspect in a text editor.
The downloaded filename follows the pattern fotogrids-export-YYYY-MM-DD.json (or .xml).
Importing Data #
The import process runs in two phases: Analyse and Execute. This two-step approach lets you review what the file contains before anything is written to the database.
Phase 1 — Analyse
Upload your export file (JSON or XML — the format is detected automatically). FotoGrids reads the file and returns a summary of what it contains: how many Galleries, Albums, items, tags, templates, and statistics are present, along with the FotoGrids version and site URL the file was exported from. Nothing is imported yet.
Review the summary to confirm the file is what you expect before proceeding.
Phase 2 — Execute
After reviewing the analysis, select which data types to import and choose how to handle any conflicts. FotoGrids then writes the data to the database inside a single transaction — if anything fails, the entire import is rolled back and nothing is written.
Conflict resolution
When a Gallery or Album with the same slug already exists on the destination site, you choose one of three options:
| Setting | Galleries / Albums (on conflict) |
| Options | Skip Overwrite Duplicate |
| Default | Skip |
- Skip — the existing Gallery or Album is left unchanged. Items, relationships, and metadata that reference the existing ID are still imported and linked to it.
- Overwrite — the existing Gallery or Album’s post meta is updated with the imported settings. The post itself (title, slug, ID) is not replaced.
- Duplicate — a new Gallery or Album is created with a modified slug (e.g.
my-gallery-1), leaving the existing one untouched.
A note on items and attachments
FotoGrids items link to WordPress Media Library attachments by ID. When importing between two different sites, the attachment IDs in the export file almost certainly differ from those on the destination site. Items whose attachment_id does not match an existing media file on the destination site are skipped automatically. Re-uploading the images to the destination site’s Media Library before importing will give the best results.
Within the same site (for example, restoring from a backup), attachment IDs match and items import cleanly.
Importing with Overwrite updates post meta on existing Galleries and Albums. This cannot be undone. Take a fresh export before running a destructive import on a production site.
The Operation Log #
A log of the last 50 import and export operations is stored automatically. Each entry shows the operation type (import or export), a summary of what was processed, the date and time, and whether it completed successfully or partially (when some items were skipped). The log is accessible via the History tab, which sits alongside the Export and Import tabs at the top of the tool.