This tool provides an API for remote command execution.
- Install as regular Magento 2 module
- Open your Nginx configuration and replace:
# PHP entry point for main application
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check)\.php$ {
with
# PHP entry point for main application
location ~ ^/(index|get|static|errors/report|errors/404|errors/503|health_check|remote)\.php$ {
- Copy
dist/remote.php
topub
directory - Enable module
./bin/magento module:enable --all
There is no authentication available.
- Retrieve a list of available commands:
curl -X GET "http://magento2.docker/remote.php"
Example response:
{"admin:user:create":{"description":"Creates an administrator","help":"","usages":[],"definition":[]}}
Note: The list response for all comands is large
- Run a specific command
curl -X GET "http://magento2.docker/remote.php?type=run&name=maintenance:status"
Example response:
Status: maintenance mode is not active
List of exempt IP-addresses: none