This is a WordPress development environment based on Lando which I use for my WordPress projects. It allows for core development, plugin development, and theme development. Lando is an extremely flexible local development environment that is based on Docker.
This repository contains the Lando configuration file .lando.yml
along with config/php.ini
config/nginx.conf
config/httpd.conf
files for server configuration.
Before you get started with this setup I assume that you have:
- Installed Lando and gotten familiar with its basics
- Got familiar with Lando's WordPress recipe
- Read about the various services, tooling, events and routing Lando offers.
- Configure
.lando.yml
and replace{project}
with project name - Specify the desired PHP version, web server and database server
- Run the command
lando start
from the project root. - Create WordPress folder with
mkdir wordpress
and move into it bycd wordpress
- Download WordPress with WP CLI by
lando wp core download
- Then visit the WordPress folder (
wp-{project}.lndo.site/wordpress/
) and go through install steps
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.
database: wordpress
username: wordpress
password: wordpress
host: database
# for mysql
port: 3306
# for postgres
# port: 5432
Go to pma.wp-{project}.lndo.site
to visit PHPMyAdmin and mail.wp-{project}.lndo.site
to visit MailHog.
Add following options to your Browsersync script:
"browserSyncOptions": {
"proxy": "https://wp-{project}.lndo.site",
"port": 80,
"SSL": true,
"open": false,
"notify": false
},
Refer to Lando's extensive documentation.