enpii / wp-site-enpii-boilerplate
The WordPress boilerplate for WordPress development with Laravel ready
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:wordpress-project
Requires
- php: ^7.3|^8.0
- enpii/appeara-alpha: *
- enpii/demoda: *
- enpii/enpii-base: dev-wp-release
- johnpbloch/wordpress-core: ^6.0
- josegonzalez/dotenv: 4.0.0
- mcaskill/composer-exclude-files: ^3.0.0
- wp-plugins/woocommerce: ^8.0
- wpackagist-theme/storefront: ^4.0
- wpackagist-theme/twentytwentythree: ^1.0.0
Requires (Dev)
- 10up/wp_mock: ~0.5.0|^1.0.0
- automattic/vipwpcs: ^3.0.0
- codeception/codeception: ^4.2.0|^5.0.0
- codeception/module-asserts: ^1.3.0|^3.0
- codeception/module-phpbrowser: ^1.3.0|^3.0
- phpcompatibility/php-compatibility: ^9.3.5
This package is auto-updated.
Last update: 2024-04-23 07:55:05 UTC
README
- Update the dependencies
XDEBUG_MODE=off composer update
Initialize
- Create the project (stable version)
composer create-project enpii/wp-site-enpii-boilerplate <folder-name>
- Use development version (branch master)
composer create-project -s dev enpii/wp-site-enpii-boilerplate <folder-name>
in case you want to specify the branch (e.g. branch develop)
composer create-project -s dev enpii/wp-site-enpii-boilerplate:dev-develop <folder-name>
- Ensure that you have tne .env file, if it doesn't exists, you can copy from the example file
cp .env.example .env
- Then use the appropriate env variables for you working environment, remember to check the SALTS section to use correct ones.
Deploy with Docker
- Start all containers
docker-compose compose up -d
then the website would be available at http://127.0.0.1:19080/ (the port 19080 can be edited in .env file)
- Update composer with Docker
docker-compose exec -e XDEBUG_MODE=off wordpress composer update
- Run phpcs
docker-compose exec wordpress ./vendor/bin/phpcs
- Run wp-app artisan
docker-compose exec --user=webuser wordpress ./wp-enpii-base-artisan wp-app:hello
or
docker-compose exec --user=webuser wordpress wp enpii-base artisan wp-app:hello
Running wp-cli
- With Docker
docker compose exec --user=webuser wordpress wp enpii-base info
- On local machine, stay on the project root
wp enpii-base info
Working with GIT
- You can put your own plugins, themes, mu-plugins to corresponding folders. Then if you use git, you can add these things to your repository by:
- Update the
./wp-content/.gitignore
to allow your plugins, mu-plugins, themes - e.g. you have a plugin called
hello-world
, you need to add this
!plugins/hello-world !plugins/hello-world/**
- Then you can
git add <your-plugin-folder>
to the repo
- Update the
Compiling assets (CSS, JS)
- This repo consists of a sample plugin Demoda and a sample theme Appeara Alpha, it has the webpack configs to compile plugin and theme CSS and JS
To install dependencies
docker compose exec wordpress yarn install
Compile plugin assets
docker compose exec wordpress yarn build-plugin
or to watch and compile
docker compose exec wordpress yarn dev-plugin
Simila to the theme with
docker compose exec wordpress yarn build-theme
and watch
docker compose exec wordpress yarn dev-theme