Use this with our docker-image: devgeniem/alpine-wordpress.
And our development tools: gdev.
- This resembles roots/bedrock project layout.
- Uploads directory has been moved into /var/www/uploads (locally mapped into .docker/uploads)
- Uses composer for installing plugins
- Include
.drone.yml
for using Drone CI. - Includes phantomjs tests through rspec for doing integration testing. Source: Seravo/wordpress.
- After you have cloned this repository in the new client project replace all
THEMENAME
andPROJECTNAME
references from all files from this project to your project name.- These can be for example:
ClientName
andclient-name
- These can be for example:
- Change project test address in
docker-compose.yml
for examplewordpress.test
->client-name.test
- Add all people working in the project into
authors
section ofcomposer.json
and rename the projectdevgeniem/wp-project
->devgeniem/client
incomposer.json
.- You can also add project managers, designers and other developers here.
- This is important so that we always have accountable people to advise with the project later on when it eventually might turn to more legacy project.
- Setup minimun viable content seed in phinx seeds so that CI can reliably do the tests.
- modify
scripts/seed.sh
script and addsphinx
seed data,.sql
dump file or custom wp cli commands.
- modify
- Use included linters for the code style and best practises
- We use
php codesniffer
with custom config inphpcs.xml
which contains Geniem Coding Standards. - This ruleset is here to help and make the developer to think about possible vulnerabilities.
- When something doesn't fit into the ruleset you can ask for a code review and add comments to ignore certain line:
// @codingStandardsIgnoreStart $query_string = filter_var($_SERVER['QUERY_STRING'], FILTER_SANITIZE_STRING) // @codingStandardsIgnoreEnd
- We use
- Add more
rspec
orphpunit
tests while you continue to add features to your site.- This helps us to avoid regressions and will enable more agile refactoring of the code when needed.
- Update this Readme as many times as you can.
- Most important details are usually the details about data models and their input/output.
- Also add all 3rd-party dependencies here
This project includes example docker-compose.yml
which you can use to develop locally. Ideally you would use gdev.
# Install php dependencies and wp plugins (run in project root directory only!!!)
$ composer install
# Start development environment
$ gdev up
# Install seed data to local database
$ gdev exec ./scripts/seed.sh
Open the url you provided in step 2 for example: client-name.test
and start developing the site.