🐥
wp-env
プロジェクト作成
cd path/to/project
npm init -y
npm install -D @wordpress/env
基本ファイル作成
.wp-env.json
{
"mappings": {
"wp-content/themes/wp-theme/": "./wp-theme/"
}
}
wp-theme/index.php
<h1>WordPress Theme</h1>
wp-theme/style.css
/*
Theme Name: WordPress Theme
*/
@charset "utf-8";
├── node_modules
├── package-lock.json
├── package.json
└── wp-theme
├── index.php
└── style.css
起動
wp-env start
wp-env stop
管理画面: http://localhost:8888/wp-admin/
user: admin
pass: password
Discussion