VSCode DevContainer Wordpress
Do you need a development, learning or teaching environment for a Wordpress project, which is quickly set up and contains all the tools you need? Maybe this is a good starting point.
You need Visual Studio Code and the Remote Containers extension.
Features
- PHP 8.1 with GD, zip and mbstring
- MariaDB 10.4
- PHPMyAdmin at port 8081
- WP CLI
First steps
- Download Wordpress with
wp core download
(https://developer.wordpress.org/cli/commands/core/download/)- Add
--locale=de_CH
or another prefered locale - Add
--version=6.0
or another prefered version
- Add
- Start PHP server with
php -S localhost:8080
- Set up Wordpress
- Via CLI
- Generate a config file with
wp config create --dbname=wordpress --dbuser=root --dbpass=mariadb --dbhost=db
- Create database with
wp db create
- Install Wordpress with
wp core install --url=localhost:8080 --title=Example --admin_user=example --admin_password=example123 --admin_email=example@example.com
or import a database dump file withwp db import wordpress.sql
- Generate a config file with
- Via Browser
- Open PHPMyAdmin at http://localhost:8081 in your browser
- Create a database
wordpress
withutf8_general_ci
as charset - Visit http://localhost:8080 in your browser
- Fill out the form with database
wordpress
, database userroot
, database passwordmariadb
and database hostdb
. - Fill out the site information as you like
- Via CLI