Joomla utilities for DDEV
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
René Kreijveld 84c9f0f46d
All checks were successful
ShellCheck / shellcheck (push) Successful in 10s
Added option for a Docroot variable in the config
2026-08-15 16:15:32 +02:00
.forgejo/workflows Added an uninstall scritpt 2026-07-11 14:00:28 +02:00
.githooks Added an uninstall scritpt 2026-07-11 14:00:28 +02:00
installer Added option for a Docroot variable in the config 2026-08-15 16:15:32 +02:00
src/Scripts Added option for a Docroot variable in the config 2026-08-15 16:15:32 +02:00
uninstaller Fixed uninstall error 2026-07-11 14:03:48 +02:00
updater Added missing setrights to LOCAL_SCRIPTS lists 2026-08-04 11:24:21 +02:00
.gitignore Ignore local CLAUDE.md 2026-07-20 09:30:51 +02:00
Install.md Updated shellcheck action 2026-05-31 14:44:03 +02:00
LICENSE Initial commit 2026-03-13 08:20:46 +01:00
README.md Added option for a Docroot variable in the config 2026-08-15 16:15:32 +02:00
Uninstall.md Added an uninstall scritpt 2026-07-11 14:00:28 +02:00
Update.md Update links after move to code.kreijveld.com 2026-05-31 14:36:06 +02:00

Bash scripts to support Joomla in DDEV

DDEV is a tool to create Docker-based PHP development environments. It gives you Container superpowers with zero required Docker skills: environments in minutes, multiple concurrent projects, and less time to deployment.

DDEV runs on macOS, Windows and Linux and on GitHub Codespaces.

This set of scripts was written to better support Joomla local development in DDEV.

These scripts also support the new ddev version 1.25.2 with joomla support, but they also work for older ddev versions.

Features

  • Create a Joomla project and automatically download and install the latest Joomla version in it.
  • Optionally place your website in a document root subfolder (public, htdocs, etc.) inside the project folder.
  • Support for the /api endpoint when you run your Joomla project on Nginx.
  • Create or import a MariaDB database dump from or to your Joomla project or dump all databases at once.
  • Create a full website backup of a Joomla project or backup all projects at once.
  • Delete a Joomla project.
  • List all installed Joomla projects.

Requirements

You need to have a working DDEV setup on your machine. Read about how to install DDEV here: ddev.com/get-started.

Configuration

The installer asks for a few default values and stores them in ~/.config/ddevjoomla/config. All scripts read this file at startup.

Variable Purpose
ROOTFOLDER The folder where all your projects are created. Every project gets its own subfolder: <Rootfolder>/<Projectname>
DOCROOT Optional document root subfolder inside the project folder (for example htdocs, web, public, public_html, docroot). Leave empty to use the project folder itself as document root
BACKUPFOLDER The folder where your backups are stored
WEBSERVER The default webserver for new projects, nginx or apache

When DOCROOT has a value, jaddsite creates that subfolder, installs the website in it and configures DDEV to use it as document root. The .ddev folder always stays in the project folder. jclone takes over the document root of the project you are cloning, so a clone always has the same layout as its source.

All other scripts do not use this setting at all: they read the document root from the project's own .ddev/config.yaml. Because of that you can run them from the project folder as well as from the document root subfolder, and a setup with a mix of projects with and without a document root subfolder keeps working. gosite takes you to the document root, where your Joomla files are, and you select a site by its project name.

Database dumps are stored in the document root, next to your Joomla files, so they are included in a document-root-only backup (jbackup -r). That applies to jdbdump (unless -b puts the dump in the backup folder) and to jdbdumptable, and jdbimp looks for dump files in the document root as well. All three work when started from the project folder or from the document root. jdbdumpall always writes to the backup folder.

You can change these values afterwards by editing ~/.config/ddevjoomla/config in a text editor. Existing projects are not affected by such a change; the new value is used for projects you create afterwards.

Utility Scripts

The following scripts will be installed which do the following:

Script Purpose
jaddsite Create a new DDEV Joomla project (PHP version, webserver, optional docroot subfolder, optional Joomla install)
jdelsite Permanently delete a DDEV Joomla project and its files
jclone Clone an existing DDEV Joomla project (including the database) to a new project name
jphpswitch Switch the PHP version of an existing DDEV Joomla project
jlatest Download and extract the latest (or specified) Joomla release
jdbdump Export the DDEV database (ddev export-db)
jdbdumpall Export the DDEV database of all Joomla projects to SQL dump files
jdbdumptable Export one table from the DDEV database to a SQL dump file
jdbimp Import a database dump (ddev import-db)
jbackup Full site backup: database dump + compressed archive (.tgz or .zip) of the whole project folder, or of the document root only with -r
jbackupall Full backup of all DDEV Joomla projects (database dump + archive)
jxdb Displays xdebug status and enables or disables xdebug
jinfo Displays info about the Joomla project and shows DDEV description
jsetconfig Set the essential DDEV values (database, log and tmp paths) in configuration.php
gosite cd into the document root of a Joomla site by project name (gosite <site>), or interactively select one when no name is given (requires shell function wrapper in .zshrc/.bash_profile)
jlistjoomlas List all Joomla sites found under the configured root folder
setrights Set correct file permissions (644 files, 755 dirs)
jddev Show all available scripts and their command-line parameters
jddev-update Update all ddev-joomla scripts from the GitHub main branch
jddev-checkupdate Internal helper: checks once a day, in the background, for available script updates

Contributing

ShellCheck runs server-side on every push via the Forgejo Actions workflow .forgejo/workflows/shellcheck.yml — this always runs and is the authoritative check.

For fast feedback, you can also activate the local pre-commit ShellCheck hook after cloning:

git config core.hooksPath .githooks

This runs shellcheck on all scripts automatically before each commit.

Backup & Safety

The installer script automatically creates backups of all configuration files and existing scripts before making any changes.

Installation, Updates & Uninstallation

Follow these installation instructions to get everything up and running.

Regular updates are provided in this repository. Use the local jddev-update command to update your local jddev scripts.

If you want to remove the scripts again, follow these uninstall instructions.

Documentation

Documentation can be found in the Wiki pages.

Support the Project

If you like and use this tool, please consider making a donation to support further development. 🙌