Site Management
jaddsite
Create a new DDEV Joomla project.
Usage
jaddsite -n <sitename> [-p <php_version>] [-w <webserver>] [-j] [-a] [-v] [-s] [-h]
Options
| Option | Description |
|---|---|
-n <sitename> |
The website name (no spaces). Required. |
-p <php_version> |
PHP version to use (default: 8.4) |
-w <webserver> |
Webserver type: nginx or apache (default: from config) |
-j |
Download and install the latest Joomla automatically |
-a |
Add Adminer (MariaDB database management) to the project (optional) |
-v |
Verbose - show all DDEV output |
-s |
Silent - suppress all messages |
-h |
Display help |
What it does
- Creates a site directory under
ROOTFOLDER/<sitename> - Runs
ddev configwith the specified PHP version and webserver - Creates
.ddev/php/joomla.iniwithdisplay_errors = offandoutput_buffering = off - Starts the DDEV project
- If Nginx is selected, depending on the ddev version it adds the Joomla API location block to
nginx-site.conf:
If you use ddev version 1.25.2 or higher, joomla support is builtin into ddev, and a modification oflocation /api/ { try_files $uri $uri/ /api/index.php?$args; }nginx-site.confis not needed. - If
-ais specified, installs the Adminer add-on for database management and restarts DDEV - If
-jis specified, downloads and installs Joomla with the CLI installer
Joomla auto-install details (with -j)
When -j is used, Joomla is installed with these defaults:
| Setting | Value |
|---|---|
| Admin username | admin |
| Admin password | AdminAdmin1! |
| Admin email | admin@example.com |
| Site name | Joomla |
| Database host | db |
| Database name | db |
| Database user | db |
| Database password | db |
| Database prefix | Random 5-character lowercase string |
| SEF rewrite | Enabled |
| Session lifetime | 120 minutes |
For Apache, htaccess.txt is automatically copied to .htaccess.
Examples
Create an empty site with default settings:
jaddsite -n mysite
Create a site with Joomla installed, using PHP 8.3 and Apache:
jaddsite -n mysite -p 8.3 -w apache -j
Create a site silently (e.g. from a script) and download and install Joomla:
jaddsite -n mysite -j -s
jdelsite
Permanently delete a DDEV Joomla project and all its files.
Usage
jdelsite -n <name> [-v] [-s] [-h]
Options
| Option | Description |
|---|---|
-n <name> |
The name of the website to delete. Required. |
-v |
Verbose - show all DDEV and Docker output |
-s |
Silent - suppress all messages |
-h |
Display help |
What it does
- Shows a warning and asks for confirmation before proceeding
- Stops the DDEV project (
ddev stop) - Deletes the DDEV project without creating a database snapshot (
ddev delete -O -y) - Prunes the Docker builder cache
- Removes the site folder from disk
Warning: This action is irreversible. All files and the database will be permanently deleted. Make a backup first if needed.
Example
jdelsite -n mysite
jclone
Clone an existing DDEV Joomla project (including the database) to a new project name. Run from inside the source project's root folder.
Usage
jclone -n <new_name> [-v] [-s] [-h]
Options
| Option | Description |
|---|---|
-n <new_name> |
The name for the cloned project (no spaces). Required. |
-v |
Verbose - show all DDEV output |
-s |
Silent - suppress all messages |
-h |
Display help |
What it does
- Reads the PHP version and webserver type from the source project's
.ddev/config.yaml - Prompts for confirmation before proceeding
- Dumps the source database to a temporary file
- Copies all source files to
ROOTFOLDER/<new_name>(excluding.ddev) - Creates a fresh DDEV config for the clone using the same PHP version and webserver
- Starts the cloned DDEV project
- Imports the database dump into the clone
- Clears the Joomla cache and tmp folders
The new project is available at https://<new_name>.ddev.site.
Note: If the source site has its hostname hardcoded (in articles, custom modules,
$live_site, etc.), those references will need to be updated manually.
Examples
Clone the current site to a new project named mysite-clone:
cd ~/Development/sites/mysite
jclone -n mysite-clone
Clone with verbose output:
jclone -n mysite-test -v
jphpswitch
Switch the PHP version of an existing DDEV Joomla project. Run from inside your site folder.
Usage
jphpswitch -p <php_version> [-v] [-s] [-h]
Options
| Option | Description |
|---|---|
-p <php_version> |
The new PHP version (e.g. 8.2, 8.3, 8.4). Required. |
-v |
Verbose - show all DDEV output |
-s |
Silent - suppress all messages |
-h |
Display help |
What it does
- Reads the current PHP version from
.ddev/config.yaml - If the project is already on the requested version, exits without doing anything
- Prompts for confirmation before proceeding
- Updates the DDEV config with
ddev config --php-version=<version> - Restarts the DDEV project with
ddev restart
Examples
Switch to PHP 8.3:
cd ~/Development/sites/mysite
jphpswitch -p 8.3
Switch to PHP 8.4 with verbose output:
jphpswitch -p 8.4 -v
jxdb
Displays xdebug status and enables or disables xdebug. Run from inside your site folder.
Usage
jxdb [on|off]
Options
| Option | Description |
|---|---|
no parameter |
Shows current xdebug status |
on |
Enables xdebug |
off |
Disables xdebug |
What it does
- Shows the status of xdebug when run without a parameter.
- Enables or disables xdebug
Example
jxdb on