Getting started

Installing the Magento module

The MageDrop_Magento2 module adds staging and preview to your Magento 2 admin (CMS pages, CMS blocks, categories and products) and exposes the REST endpoints MageDrop deploys through. It doesn't change your catalog or CMS tables: it adds the MageDrop button, intercepts the saves you explicitly flag for staging, and applies deploys with Magento's own models.

The source code is on GitHub: github.com/MageDrop/Magento2.

Requirements

  • Magento Open Source or Adobe Commerce 2.4.6 or later
  • PHP 8.2 or later
  • Composer (or Git, for an install without Composer)
  • Shell access to run Magento CLI commands

MageDrop works with Luma and Hyvä themes. There is nothing extra to install for either.

Installation

Run these from the Magento root as the web server user. Pick the tab that matches how the store runs.

$ bin/magento maintenance:enable
$ composer require magedrop/magento2:^2.0
$ bin/magento module:enable MageDrop_Magento2
# Registers the module and its admin settings
$ bin/magento setup:upgrade --keep-generated
$ bin/magento setup:di:compile
# Add your locales if you use more than one, e.g. en_GB en_US
$ bin/magento setup:static-content:deploy -f
$ bin/magento cache:flush
$ bin/magento maintenance:disable

Run from the Magento root as the web server user. For live stores in production mode. Maintenance mode keeps shoppers on a holding page while static files rebuild.

$ composer require magedrop/magento2:^2.0
$ bin/magento module:enable MageDrop_Magento2
$ bin/magento setup:upgrade
$ bin/magento cache:flush

Run from the Magento root as the web server user. Staging or local stores in developer mode compile code and static files on demand.

$ mkdir -p app/code/MageDrop
$ git clone https://github.com/MageDrop/Magento2.git app/code/MageDrop/Magento2
$ bin/magento module:enable MageDrop_Magento2
$ bin/magento setup:upgrade
$ bin/magento cache:flush

Run from the Magento root as the web server user. Copies the module into app/code. Run the production steps afterwards (from module:enable) if the store is in production mode.

To confirm the module is registered:

bin/magento module:status MageDrop_Magento2

You should see Module is enabled.

Configuration

Once the module is installed, configure it in the Magento admin:

  1. Go to StoresConfigurationMageDropConnection and open API Connection.
  2. Fill in the fields below.
FieldDescriptionValue
Enabled Turns MageDrop on. When disabled, the MageDrop button and preview are hidden. Yes
Module Token Authenticates the module with MageDrop. Copy it from the setup wizard, or from the store's Settings page in the dashboard. Your store's token
API URL Override Leave empty. Only used to point the module at a local or staging copy of MageDrop. Empty
  1. Click Save Config. The module immediately reports its version, entity types and store views to MageDrop and confirms the connection in the admin message bar.

The same section has a Media Cleanup group. With Clean Up Unused Media on, a daily Magento cron job deletes images MageDrop kept that nothing uses any more: uploads from releases that were never deployed, and gallery images a deploy removed from a product. Keep For (Days) sets how long removed images are kept so a rollback can restore them. Make sure Magento's cron is running.

Verifying the connection

  1. In the MageDrop dashboard, open your store.
  2. On the Connection card, click Test next to MageDrop module (or Test module connection in the setup wizard).
  3. A success message confirms the round trip: MageDrop calls your store, and the module calls MageDrop back.

If the test fails, check that:

  • The Module Token matches the token shown in the MageDrop dashboard.
  • Your server can make outbound HTTPS requests (check firewall rules).
  • The integration has the MageDrop > API permission.

Magento's var/log/system.log and var/log/exception.log have the details.

Updating the module

bin/magento maintenance:enable
composer update magedrop/magento2
bin/magento setup:upgrade --keep-generated
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
bin/magento maintenance:disable

In developer mode you only need composer update, setup:upgrade and cache:flush.

Upgrading from 1.x to 2.0

Version 2.0 adds categories, products and store-view scope, and deploys through the module's own REST endpoints. After upgrading:

  • Edit the MageDrop integration under SystemIntegrations, tick MageDrop on the API tab, save and reactivate it. Until you do, the dashboard shows a permission warning and deploys fail.
  • Nothing else changes for your team: the MageDrop button now also appears on category and product forms.

Extending the module

Every entity type is an adapter and every group of fields is a section handler. A third-party or client module can register a handler for its own product-form tab (a fabric configurator, a delivery-options grid) or an adapter for a whole custom entity, and MageDrop stages, previews and deploys it like everything else. See Custom data and extensions for a worked example.

Uninstalling the module

bin/magento maintenance:enable
bin/magento module:disable MageDrop_Magento2
composer remove magedrop/magento2
bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
bin/magento maintenance:disable

In developer mode, skip the maintenance, compile and static-content steps. Remember to deactivate or delete the MageDrop integration under SystemIntegrations as well.

Something missing or unclear? Tell us and we will fix the page.