Roots is a team building WordPress developer tools such as Sage, Bedrock, Trellis and Acorn, and its blog documents them.
Commenters recommend its tools as the way to do modern WordPress development, and people asking for theme starting points are pointed to it.
I would say some contributors comply with standards - but the stuff coming from Automattic is scary.
I ended up in a position where I've become responsible for a very high volume WooCommerce/Wordpress store and the things that I've seen in _brand new code_ is mind boggling. Their new, branded, in-house paypal plugin/integration is currently at 1.5/5 rating on the wordpress plugin marketplace [0]. It just doesn't work for various reasons for various people. It's 2021, how do you screw up a payment gateway for wordpress when you _are_ wordpress? But wait, there's more. They already had PayPal integration, built into the core and already included in all WooCommerce installs. So what to do? Force disable the already existing, working-properly, integration and recommend their new plugin to be used. [1] This is hostile.
If your woocommerce webhook delivery fails 3 times in a row, woocommerce will just turn off that webhook/stop delivering them. Silently. No option for any sort of alert to be sent/logged, no way to store/replay the missed webhooks. Just off. This is irresponsible.
Our installation happens to have a lot of details that go into each line item on an order - which, in turn, turns into many rows of meta data. Woocommerce doesn't rely on dedicated tables for orders or related metadata, it's all stuffed into 'posts' and 'post_meta'. It doesn't scale well, terrible really. It's a large enough problem that LiquidWeb starting working on a fix for high volume sites that…
WordPress is definitely the Jenkins of the CMS world. Easy for a desktop user to set up, absolutely trash for literally every best practice, but nobody's made anything better [for free] yet.
If you are trying to deploy WordPress today with DevOps best practices (version control/12 factor app/etc): set it up with Bedrock (https://roots.io/bedrock/), manage dependencies with Composer, and use environment variables for the runtime configuration. Then use Phinx (https://phinx.org/) to do database migrations. A custom db migration script will be needed to change database settings based on the environment you're deploying to.
Containerization is pretty annoying, because apparently php-fpm will not serve non-PHP content (without creating security concerns). So you need a web server to serve all the static content that comes with Wordpress/Plugins/etc, and php-fpm to serve the PHP. This means you have to either 1) duplicate the static content between two different containers, 2) duplicate the static content into some other storage medium (S3?) and serve it using some web server, or 3) create a frankenstein's monster container of both php-fpm and a web server, and pick your poison on how to make that suck as little as possible.
I have opted for #3 as operationally it's the simplest. You build one container with all the dependencies, static content, and sql migrations, and deployments therefore become just a single container with a single port (http/https) and passing in the env…
It sure seems that way until you need to get just a little bit deeper and you realize what a dumpster fire WordPress is.
You want metadata on posts, you install ACF. You want to filter on that metadata, good luck if it's over a couple filters simultaneously, the SQL queries will time out. Take a look at WP's insane schema to figure that one out.
Gutenberg promises to have WYSIWYG editable React components, which is a big deal, but they made insane decisions like storing the attributes in HTML, rendering HTML in the database, and requiring component developers to keep an array of deprecated changes when they want to modify anything on the component.
There are some people trying to untangle Wordpress by refactoring and bolting Laravel onto it[1], but every layer is just a nightmare; the authors of different parts can barely assess why things randomly break.
You might find WP appealing for the plugin ecosystem, but the plugins are completely random in implementation, so you're likely to get a bloated scramble of CSS and JS pushed to your users.
I moved to Directus and Astro, but I would probably use a Laravel-based CMS like October or Statamic for more generalized PHP deployment.
[1]: https://roots.io/
This is one way to do it, though I can't recommend it as the best way.
The first step is building your WordPress site correctly, and for me, that starts with using trellis (https://roots.io/trellis) and bedrock (https://roots.io/bedrock).
He's partially correct about S3 for media and uploads, but you want to take it one step further and use Imgix for actual image (jpeg/png) delivery because it'll do all of the transformations, cropping, etc. for you without WordPress mucking it up. At that point you have a fairly stateless WordPress installation and can spin up any number of instances of it. Here's my plugin for handling both S3 and Imgix: https://github.com/jawngee/ilab-media-tools/
CloudFlare is really the best thing to happen to WordPress since Imgix. Using CloudFlare's ability to cache at the root and sending correct caching headers from WordPress to CloudFlare, you are virtually indestructible.
We run a news site that gets about 500K uniques a month off a $20 instance on Digital Ocean this way. Granted, it's static, eg no user directed dynamic content like comments, votes, etc.
We build a lot of WordPress sites this way.
PHP isn't as bad as it used to be. Yes fundamental operator order is erratic and I'm forever googling basic functions, but the ecosystem has produced some good stuff over the past couple years.
Read up on Composer and Packagist. It's basically NPM, Gems, or PyPi for PHP. There are now solid interoperable libraries for most common tasks.
- https://getcomposer.org
- https://packagist.org
Laravel is a great framework, but quite a bit of what's out there seems to be built on the Symfony foundation.
- http://laravel.com
- http://symfony.com
There are also great coding guidelines and tools that are evolving. The PHP Framework Interoperability Group has produced some solid coding standards and tooling has followed.
- http://www.php-fig.org
WordPress...it makes me sad. But it's ubiquitous. If you're stuck doing WP work, take a look at the Roots project. It's a sane, modern approach with good tooling.
- https://roots.io
They're all going to hit wordpress.org for plugins and themes. I would definitely stay away from Debian's packages, which are outdated the moment they're installed, and the setup looks painfully fiddly and manual anyway.
An alternative to wp.org's infrastructure would be the likes of https://roots.io/bedrock, which uses composer to install and update plugins and themes along with wordpress itself. The infrastructure it uses is called WordPress Packagist, which is run by outlandish.com using github as the distribution infrastructure. The whole thing is open source, so you could run your own wpackagist service if you like.
Using bedrock in a container, I upgrade the site by building and uploading a new container image. Anything goes wrong, I roll back to the previous image. Cattle, not pets.