Ready to get started?

Check out the plugin on GitHub and start using it today.

Twelve-Factor App for WordPress

In this section, we will look at The Twelve-Factor App guide and its adaptation for use when developing WordPress projects.

1. Codebase โ€“ one code repository per application (Theme / Plugin).

Auto
<strong>Single Code</strong> - <a href="https://en.wikipedia.org/wiki/Single_source_of_truth">Single source of truth</a>

This factor for WordPress adaptation:


Each site / theme / plugin โ€” should live in its own repository.
Donโ€™t make multiple sites with the same code and patches โ€” fork them.

Example for really practice:
wp-content/themes/mytheme โ€” one git repository
wp-content/plugins/myplugin โ€” another

  1. Codebase โ€“ one code repository per application (Theme / Plugin).
  2. Dependencies โ€“ explicit declaration of dependencies.
  3. Config โ€“ configurations are stored in the environment.
  4. Backing services โ€“ services as resources (DB, cache, queues, etc.).
  5. Build, release, run โ€“ separate stages of build, release and launch.
  6. Processes โ€“ the application is launched as one or more processes.
  7. Port binding โ€“ independent HTTP service (not through Apache).
  8. Concurrency โ€“ scaling through processes.
  9. Disposability โ€“ fast start and correct termination of the process.
  10. Dev/prod parity โ€“ minimizing the difference between environments.
  11. Logs โ€“ streaming logging to stdout (do not store internally).
  12. Admin processes โ€“ one-time tasks as commands (console).