For local WordPress and Laravel development, I tend to use a Docker-based solution, most of the time. Depending on the project, I either use Lando or docker-compose. This post is about Lando. Lando, is no DesktopServer. DesktopServer gives you a simple GUI for creating WordPress sites. Lando has no user interface, you do everything from the command line. That’s good or bad, depending on what you need.
Here is how I create new sites for local development using Lando.
Create The WordPress
Initialize lando in current directory:
lando init –recipe=wordpress
Add a WordPress:
wp core download
wp config create –dbname=wordpress –dbuser=wordpress –dbpass=wordpress –dbhost=database –skip-check
That downloaded WordPress core and setup wp config to match Lando’s default variables:
wp config create –dbname=wordpress –dbuser=wordpress –dbpass=wordpress –dbhost=database –skip-check
Optional step, but it’s best before going further to add phpunit, MailHog and xdebug. MailHog intercepts all emails coming from the application and provides a webmail-like UI for reading the caught emails.
I love xdebug, I can’t imagine PHP development without it.
In order to run tests
Source: https://managewp.org/articles/17850/create-a-wordpress-site-with-lando
source https://williechiu40.wordpress.com/2018/09/07/create-a-wordpress-site-with-lando/
No comments:
Post a Comment