Turning a WordPress site into a Twelve-Factor App. If you're going to be creating complex websites with WordPress, then you need to get serious about it.
Tag: Twelve Factor
Factor #12: Run admin/management tasks as one-off processes. Write custom WP-CLI commands to guarantee you'll have access to your WP environment.
One of WordPress' biggest failings is not providing better logs. You can investigate implementing your own logging by using WP hooks and actions.
Factor #10: Dev/prod parity. Keep development, staging, and production as similar as possible. It’s all about automating your setup.
Factor #7: Port binding. Use Nginx + PHP-FPM in production for more flexibility and much better performance over Apache + mod_php.
Twelve-factor processes are stateless and share-nothing. Issues you'll run into with making sure WordPress is stateless: sessions and uploaded files.
Factor #5: Build, release, run. You shouldn't be deploying code to production if you can't reliably rollback a deploy.
Factor #4: Backing services. The important outcome of treating backing services as attached resources is that it's mostly taken care of by a proper config.
The twelve-factor app stores config in environment variables. See how to take wp-config.php and store configuration as environment variables.