AdvancedLesson 10 of 22 · 6 steps

Export your Sandbox elements as a plugin

Package reviewed custom elements so they can run when EMCP Tools is deactivated.

Video coming soon

Your next step is ready.

Follow the complete written guide below.
The video will join it here when it’s ready.

Start the written lesson

Before you start

  • EMCP Pro 3.18.0+ and Sandbox Plugin Export enabled under Modules → Site & safety.
  • Reviewed, active Sandbox artifacts and a disposable test site for the handover.
  • PHP ZipArchive and a writable temporary directory outside web-served paths.

Let’s do this, step by step.

Step 01

Review the active artifacts

Open Build → Sandbox. Inspect widgets, blocks and snippets and their active state. Activate only reviewed drafts that belong in the export.

The export includes active elements. A draft is not included just because it exists. Review what you want to package before switching anything on.

Step 02

Enter the plugin details

Choose Export as plugin. Set Plugin name, Slug, Author and Version. Under Include, select the artifact kinds you need.

Give your plugin a clear name and version. Choose which types to include. Each selected type includes its active elements, so check the full list.

Step 03

Check dependencies and keys

Review What will be exported, Bundled runtime, Skipped items and API key constants. Leave Embed current API keys in config.php off; configure required constants privately on the destination.

Read the export list and any skipped item. Keep keys out of the package by default. Remote-data elements need their keys configured on the destination; the encrypted keys from this site do not move automatically.

Step 04

Build and install the ZIP

Click Build and download ZIP. Install and activate it on the practice site while EMCP Tools is still active. Check the dormant notice. Replace an existing export with a new version rather than activating a second.

Download the ZIP and install it on your test site. While EMCP is active, the exported plugin stays asleep to avoid registering the same elements twice. Keep one export responsible for them.

Step 05

Test the handover

On the practice site deactivate EMCP Tools, then inspect pages and editors using the exported elements. Reactivate EMCP to test the return.

Deactivate EMCP on the test site and reload the pages. The export now supplies its elements. Turn EMCP back on and the export becomes dormant again. Check the visible output in both states.

Step 06

Resolve export warnings

If Cannot build here appears, have the host configure a safe writable temporary directory and verify ZipArchive. Review early-hook snippet warnings. Update artifacts in EMCP and export a new version instead of editing generated files.

Read any build warning before continuing. Some early-running snippets cannot work after the export takes over. A lapsed Pro license does not activate the export while EMCP stays active, so verify the handover explicitly.

You’re done when…

The exported plugin supplies the intended elements on the test site with EMCP deactivated.

Keep the reference handy.

The docs cover tool details and requirements for this lesson.