Skip to main content
  1. All Posts/


Tools Open Source PHP WordPress


Megh is a command line interface for managing multiple applications (WordPress, Laravel, etc.) running simultaneously on port 80.



Megh is tested on Mac and debian based systems, like Ubuntu.


wget -O - | bash


Download and install Docker Desktop for Mac from here or install via brew:

brew cask install docker

Now install Megh CLI

composer global require megh/megh-cli


Available commands:

check    Check docker and proxy status
  create   Create a new site
  delete   Delete a site
  disable  Disable a site
  enable   Enable a site
  help     Displays help for a command
  install  Install and Configure Megh
  list     Lists commands
  start    Start Megh services
  stop     Stop Megh services


After installing the CLI, a install command needs to be run to install the docker configuration.

# install and configure megh
megh install

# start the services
megh start

Site Commands

Creating, deleting and managing sites

Create a new site

Creating a site will automatically create a database and user for that site. For Laravel and WordPress sites, the credentials will be automatically replaced in the config or env file.

megh create [--type=] [--php=] [--username=] [--email=] [--pass=] [--add-host]

--type: Type of the site. php, wp, laravel. Defaults to php.
--php: The PHP version. 7.2, 7.3, 7.4. Defaults to 7.4.
--username: The WordPress admin username if --type=wp. Default is megh
--email: The WordPress admin email if --type=wp. Default is
--pass: The WordPress admin password if --type=wp. A default password will be generated in nothing provided.
--add-host: Wheather to add the domain to the hosts (/etc/hosts) file. Default is false

# WordPress
megh create --type=wp

# WordPress with credentials
megh create --type=wp --username=john --pass=johndoe

# Laravel
megh create --type=laravel

Delete a site

The site will be deleted along with database and files.

megh delete

Disable a site

It temporary disables a site. Docker compose down and removes the site from the network.

megh disable

Enable a site

Enables a disabled site. Docker compose up and connects back to the network.

megh enable