Joomla! is an award-winning content management system (CMS), which enables you to build web sites and powerful online applications.
- Getting Started
- Connecting to your database
- Importing Your Database
- Additional Reading
Before you get started with this recipe we assume that you have:
- Installed Lando and gotten familar with its basics
- Initialized a Landofile for your codebase for use with this recipe
- Read about the various services, tooling, events and routing Lando offers.
However, because you are a developer and developers never ever RTFM you can also run the following commands to try out this recipe with a vanilla install of Joomla.
# Initialize a joomla recipe using the latest Joomla version lando init \ --source remote \ --remote-url https://downloads.joomla.org/cms/joomla3/3-9-2/Joomla_3-9-2-Stable-Full_Package.tar.gz \ --recipe joomla \ --webroot . \ --name my-first-joomla-app # Start it up lando start # List information about this app. lando info
Here are the configuration options, set to the default values, for this recipe. If you are unsure about where this goes or what this means we highly recommend scanning the recipes documentation to get a good handle on how the magicks work.
recipe: joomla config: php: 7.2 via: apache:2.4 webroot: . database: mysql:5.7 xdebug: false config: database: SEE BELOW php: SEE BELOW server: SEE BELOW vhosts: SEE BELOW
Note that if the above config options are not enough all Lando recipes can be further extended and overriden.
Here is the recipe config to set the Joomla recipe to use
recipe: joomla config: php: 7.1
By default this recipe will be served by the default version of our apache service but you can also switch this to use
nginx. We highly recommend you check out both the apache and nginx services before you change the default
With Apache (default)
recipe: joomla config: via: apache
recipe: joomla config: via: nginx
By default this recipe will use the default version of our mysql service as the database backend but you can also switch this to use
mariadb or 'postgres' instead. Note that you can also specify a version as long as it is a version available for use with lando for either
Also note that like the configuration of the
php version you should consult the Joomla requirements to make sure the
version you select is actually supported by Joomla itself.
Using MySQL (default)
recipe: joomla config: database: mysql
recipe: joomla config: database: mariadb
recipe: joomla config: database: postgres
Using a custom version
recipe: joomla config: database: postgres:9.6
recipe: joomla config: xdebug: true|false
However, for more information we recommend you consult the php service documentation.
You may need to override our default Joomla config with your own.
If you do this you must use files that exists inside your applicaton and express them relative to your project root as below.
Note that the default files may change based on how you set both
via. Also note that the
server config will be either for
nginx depending on how you set
via. We highly recommend you check out both the apache and nginx if you plan to use a custom
A hypothetical project
Note that you can put your configuration files anywhere inside your application directory. We use a
config directory in the below example but you can call it whatever you want such as
./ |-- config |-- default.conf |-- my-custom.cnf |-- php.ini |-- server.conf |-- index.php |-- .lando.yml
Landofile using custom joomla config
recipe: joomla config: config: database: config/my-custom.cnf php: config/php.ini server: config/server.conf vhosts: config/default.conf
Lando will automatically set up a database with a user and password and also set an environment variables called
LANDO INFO that contains useful information about how your application can access other Lando services.
Here are is the default database connection information for a Joomla site. Note that the
host is not
database: joomla username: joomla password: joomla host: database # for mysql port: 3306 # for postgres # port: 5432
You can get also get the above information, and more, by using the
lando info command.
Once you've started up your Joomla site you will need to pull in your database and files before you can really start to dev all the dev. Pulling your files is as easy as downloading an archive and extracting it to the correct location. Importing a database can be done using our helpful
lando db-import command.
# Grab your database dump curl -fsSL -o database.sql.gz "https://url.to.my.db/database.sql.gz" # Import the database # NOTE: db-import can handle uncompressed, gzipped or zipped files # Due to restrictions in how Docker handles file sharing your database # dump MUST exist somewhere inside of your app directory. lando db-import database.sql.gz
You can learn more about the
db-import command over here
By default each Lando Joomla recipe will also ship with helpful dev utilities.
This means you can use things like
php via Lando and avoid mucking up your actual computer trying to manage
php versions and tooling.
lando composer Runs composer commands lando db-export [file] Exports database from a service into a file lando db-import <file> Imports a dump file into database service lando joomla Runs joomla commands lando mysql Drops into a MySQL shell on a database service lando php Runs php commands
# Get joomla cli help lando joomla -h # Clear the joomla cache lando joomla cache:clear # Run composer tests lando composer test # Drop into a mysql shell lando mysql # Check hte app's installed php extensions lando php -m
You can also run
lando from inside your app directory for a complete list of commands which is always advisable as your list of commands may not 100% be the same as the above. For example if you set
database: postgres you will get
lando psql instead of
If you are interested in a working example of this recipe that we test on every Lando build then check out https://github.com/lando/lando/tree/master/examples/joomla
- Updating your Landofiles to 3.0.0-rc.2+
- Accessing Your Services Externally
- Accessing Lando from Other Devices
- Exporting Databases
- Importing Databases
- Killer D8 Workflow with Platform.sh
- Lando + PhpStorm + Xdebug
- Offline Development
- Using $LANDO_INFO
- Using NodeJS Frontend Tooling
- Using Lando in Visual Studio Code
- Climbing a mountain for love
- SSH Keys
- Shared Files
- Global Config
- DNS Rebinding Protection
- File Uploads on Windows
- File Syncing Stalled
- Running VB and HyperV
- Running behind a proxy
- Switching Database Config