heyblackmagic / wp-foundation
WordPress boilerplate with Composer, easier configuration, and an improved folder structure
v1.0.0
2023-05-15 16:20 UTC
Requires
- php: >=8.0
- composer/installers: ^2.2
- oscarotero/env: ^2.1
- roots/bedrock-autoloader: ^1.0
- roots/bedrock-disallow-indexing: ^2.0
- roots/wordpress: 6.2
- roots/wp-config: 1.0.0
- roots/wp-password-bcrypt: 1.1.0
- vlucas/phpdotenv: ^5.5
- wpackagist-plugin/classic-editor: ^1.6
- wpackagist-plugin/duplicate-page: ^4.5
- wpackagist-plugin/redirection: ^5.3
Requires (Dev)
- roave/security-advisories: dev-latest
- squizlabs/php_codesniffer: ^3.7.1
README
Development from scratch
- Run
composer create-project heyblackmagic/wp-foundation ./PATH
to create a WP instance with Composer. - In the directory where the project was installed, run
composer update
to install plugins and composer dependencies. - Then run
npm install && npm run build
to install node packages and generate the asset bundle. - With the terminal enter the
./public_html
directory and executevalet link VHOST_NAME
, whereVHOST_NAME
is the name of the local domain. Example: "valet link foundation".
Development continuation from git pull
- Pull / Clone the project.
- Go to project folder and run the command
composer update
,npm install
andnpm run build
. - Rename
env.example
to.env
and update the variables. - With the terminal enter the
./public_html
directory and executevalet link VHOST_NAME
, whereVHOST_NAME
is the name of the local domain. Example: "valet link foundation".
Directory
. ├── LICENSE.md ├── README.md ├── composer.json ├── composer.lock ├── config │ ├── application.php │ └── environments │ ├── development.php │ └── staging.php ├── package-lock.json ├── package.json ├── phpcs.xml ├── postcss.config.js ├── public_html │ ├── app │ │ ├── mu-plugins │ │ │ └── bedrock-autoloader.php │ │ ├── plugins │ │ ├── themes │ │ │ └── foundation │ │ │ ├── assets │ │ │ │ └── img.jpg │ │ │ ├── components │ │ │ │ ├── component-footer.php │ │ │ │ └── component-header.php │ │ │ ├── footer.php │ │ │ ├── front-page.php │ │ │ ├── functions.php │ │ │ ├── header.php │ │ │ ├── home.php │ │ │ ├── inc │ │ │ │ ├── child-items.php │ │ │ │ ├── helpers.php │ │ │ │ ├── menu-items.php │ │ │ │ ├── template-functions.php │ │ │ │ ├── vite-constants.php │ │ │ │ ├── vite-env.php │ │ │ │ └── vite-scripts.php │ │ │ ├── index.php │ │ │ ├── meta │ │ │ │ ├── favicon.php │ │ │ │ └── fonts.php │ │ │ ├── page.php │ │ │ ├── snippets │ │ │ └── style.css │ │ └── uploads │ ├── index.php │ └── wp-config.php ├── src │ ├── js │ │ └── app.js │ ├── public │ └── scss │ ├── abstracts │ │ ├── _mixins.scss │ │ ├── _variables.scss │ │ └── index.scss │ ├── app.scss │ ├── base │ │ ├── _buttons.scss │ │ ├── _helpers.scss │ │ ├── _images.scss │ │ ├── _reset.scss │ │ ├── _root.scss │ │ ├── _typography.scss │ │ └── index.scss │ ├── components │ │ └── index.scss │ ├── snippets │ │ └── index.scss │ ├── templates │ │ └── index.scss │ └── vendor │ └── index.scss ├── templates -> public_html/app/themes/foundation ├── vite.config.js └── wp-cli.yml