webdeveric / wp-starter
WordPress dependency management with Composer
Fund package maintenance!
webdeveric
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 10
Watchers: 4
Forks: 1
Open Issues: 0
Type:project
Requires
- php: >=8
- johnpbloch/wordpress: ^6.6.0
- webdeveric/current-screen-info: ^0.3.1
- webdeveric/sample-plugin: ^1.0.0
- webdeveric/wordpress-install-fixer: ^2.0.0
- webdeveric/wordpress-muplugin-installer: ^3.0.1
- webdeveric/wp-delete-posts: dev-master
- webdeveric/wp-starter-theme-directory: *
- webdeveric/wp-tweaks: ^2.0.1
- webdeveric/wp-user-agent: ^0.4.0
- wpackagist-plugin/recently-edited-content-widget: ^0.3.2
Requires (Dev)
- phpmd/phpmd: ^2.6.0
- phpunit/phpunit: ^11.0.3
- squizlabs/php_codesniffer: ^3.1.0
- webdeveric/http-api-debug: dev-master
- wpackagist-plugin/what-template-am-i-using: ^0.2.0
- wpackagist-plugin/wordpress-importer: ^0.8.2
- wpackagist-theme/twentynineteen: ^2.7.0
- wpackagist-theme/twentytwentyfour: ^1.0.0
This package is auto-updated.
Last update: 2024-10-17 14:23:01 UTC
README
WordPress dependency management with Composer
With Composer, you can define the WordPress core as a dependency so you never have to include it in your repo. You can also specify which plugins and themes you want to require.
WordPress core files
For this to work, the WordPress core needs to be put in its own directory.
The included composer.json file is already set up to do all of this for you.
Plugins and themes
If the plugins/themes you want are published to the wordpress.org SVN repo, they will also be available on WordPress Packagist, which is a Composer repository that mirrors the SVN repo.
If you want to install a plugin from your version control system (Git, SVN, etc.), please follow these instructions.
The included composer.json file has an example of getting a plugin from Github.
Installation
Install Composer before you do anything else.
Use this repo as the basis for a new project
composer create-project -s dev --prefer-dist --no-interaction -- webdeveric/wp-starter ./your-folder-here
Local development
Run composer setup-hooks
to setup the git pre-commit
hook. It will check coding standards and run tests when you commit.
I've included a Dockerfile that is based on php:8.3-apache
It comes with Xdebug
already installed.
A sample DB will be imported the first time you build. The WordPress username and password are both wp
.
To get started, run the following:
1️⃣ make install
2️⃣ make dev
You may want to view the Makefile to see all the commands.