Back in the early days of Docker, I did a whole bunch of work to make WordPress behave as a Twelve-Factor App.
It traditionally hasn't behaved as one – which sort of makes sense, because WordPress grew-up in a world where long-lived servers with writable and persistent local disk storage was commonplace.
I'm sure things have moved on since those days. This was back in 2016. But it sure was a fun challenge!
I remember when I learned about making servers stateless by storing session information in a database and just not writing to disk and stuff. I was amazed at how much simpler it made things and added the capacity to load-balance multiple nodes without having to bother with session stickness.
Of course it made things harder in other ways like having a separate DB for sessions.
It traditionally hasn't behaved as one – which sort of makes sense, because WordPress grew-up in a world where long-lived servers with writable and persistent local disk storage was commonplace.
I'm sure things have moved on since those days. This was back in 2016. But it sure was a fun challenge!