Git Product home page Git Product logo

wp-project's Introduction

geniem-github-banner

Geniem Wordpress Project template.

Build Status License

Use this with our docker-image: devgeniem/alpine-wordpress.

And our development tools: gdev.

Features

  • 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.

Workflow for WP projects

  1. After you have cloned this repository in the new client project replace all THEMENAME and PROJECTNAME references from all files from this project to your project name.
    • These can be for example: ClientName and client-name
  2. Change project test address in docker-compose.yml for example wordpress.test -> client-name.test
  3. Add all people working in the project into authors section of composer.json and rename the project devgeniem/wp-project->devgeniem/client in composer.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.
  4. Setup minimun viable content seed in phinx seeds so that CI can reliably do the tests.
    • modify scripts/seed.sh script and add sphinx seed data, .sql dump file or custom wp cli commands.
  5. Use included linters for the code style and best practises
    • We use php codesniffer with custom config in phpcs.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
  6. Add more rspec or phpunit 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.
  7. 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

Start local development

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.

wp-project's People

Contributors

onnimonni avatar villepietarinen avatar zarubaru avatar

Watchers

Cheer Up Emo Kid avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.