Import / Export

WP Coder → Import / Export moves your work between sites: your own library of blocks for every client site, staging to production, or a backup. Every export is a .json file.

There are two kinds of export:

Export Contains
Snippets Snippets with everything they hold — in Pro also the library icons their code uses.
Snippets & Tools settings Which items are switched on on the Snippets and Tools pages, with their options.

The one Import Settings form reads both kinds.


Exporting snippets#

From What you get
Import / Export → Export Settings All snippets, or all snippets with one tag (Filter by tag)
All Codes → row action Export One snippet
All Codes → bulk action Export The snippets you ticked

Each snippet carries everything: title, HTML, CSS, JS, PHP, settings, attributes, conditions, tags, note, on/off state, test mode and pin.

Icons travel with snippets PRO. If a snippet’s HTML or PHP uses library icons ({{svg.name}}), the export includes those icons and the import adds them to the other site’s Icons page. Blocks that picked an icon store it in your posts, not in the snippet — export the icon library too when you move those (Icons page → Export icons).

Exporting Snippets & Tools settings#

Export Snippets & Tools settings downloads which items are switched on on the Snippets and Tools pages, with their options. Choose Snippets, Tools or both. The AI API key (Pro) is never exported.

Settings files move between WP Coder (free) and WP Coder Pro.


Importing#

  1. Go to Import / Export → Import Settings.
  2. Choose a .json file. In WP Coder Pro you can pick several at once — hold Ctrl (Cmd on Mac) in the file dialog. PRO
  3. Optionally tick Update item if item already exists.
  4. Click Import Settings. A notice reports how many snippets were added, updated or skipped (and in Pro how many icons were imported).

How snippets are matched — by ID#

On the target site… Without “Update item…” With “Update item…”
no snippet has this ID Added with the same ID — [wp_code id="12"] keeps working Same
a snippet already has this ID Added as a new snippet with a new ID; the existing one is untouched The existing snippet is overwritten

So “update” replaces the right snippet only when the IDs match on both sites — typically a site set up from an earlier export of the same snippets. When in doubt, import without the option and compare. With Revision History on PRO, an overwritten snippet is snapshotted first.

Icons whose name already exists are kept — unless Update item… is ticked. PRO

Importing a settings file#

A Snippets & Tools settings file replaces those settings on this site — each page it contains, as a whole (an item that is off in the file is switched off). Renamed options from older versions are carried over. The receiving site keeps its own AI API key (Pro).

After an import#

Each imported snippet’s CSS, JS and PHP files are written at once (and in Pro combined files are rebuilt). Imported snippets keep the on/off state they had — check All Codes before relying on them, especially snippets with PHP.


Errors#

  • No file was uploaded, or the upload failed. — nothing was chosen, or the server rejected the upload (check its size limit).
  • file.txt is not a .json file. — only .json exports are accepted.
  • file.json is not a valid WP Coder Pro export. — the file isn’t a WP Coder export, or it was edited. The free plugin says Please upload a valid .json file.

A malformed entry inside a valid file is skipped and counted as skipped; the rest are imported.

Notes#

  • An export contains your PHP code — store and share it like source code.
  • WP Coder and WP Coder Pro use the same snippets table, so switching between them on one site needs no export at all.
  • Global PHP is not part of an export — copy it by hand.