As a person involved with a PHP + MySQL open source CMS, this is the pull quote for me.
The vast majority of web hosting I've experienced in the last 20 years offers PHP + MySQL out of the box, even on the crummy, ancient end of the spectrum.
Related to this, knowing that just about any flavour of hosting can run the CMS in real terms is enough to keep the development in check so a wider audience can use it. There's not much point in us adding extra features if the minimum ride height is beyond the reach of most users.
I'm not convinced that Discourse is the right example here, though. Arguably the actual steps for installing Discourse aren't significantly more complicated than WordPress's install, because they've gone out of their way to make it as easy as possible. (It does suffer from "you must use Docker for this," which would likely intimidate non-techies who could otherwise suffer through a WP install, though.) Also, I don't think Discourse can remotely be described as an abject failure, given that virtually every forum I've seen go up in the last five or six years runs on it, and I can think of more than a few sites that migrated to it from legacy PHP forums in that time.
Two thoughts and personal observations on that:
1. Nobody was ever fired for buying IBM. In my impression it's usually deployed as default for and esp. by very tech affine communities. It was the new, hot - and is now save - thing in town.
2. You see postings boasting how the Discourse forum is now powered by a new six core 8 GB RAM server improving performance ... for 200 concurrent active users and 80k posts. Yes, Discourse offers a lot of flashy features, but that's just borderline disgusting.
I guess companies that use Discourse and have huge traffic can pay a bit more, nothing wrong with that.
The point being that said numbers aren't big traffic, they should be handled by a Raspi.
But for the sake of argument: Discourse is a painless move upwards for big budget and/or big knowledge entities. Nothing wrong with that.
On the other hand Discourse isn't a replacement for low cost, decentralized, easy to deploy, engine-diverse, low knowledge communities which were served by a multitude of PHP solutions in the past.
There's an economic argument for a growing divide between "communities as a service" ala Facebook and high hurdle deployments ala Discourse, but one doesn't have to be happy about this development.
Much like Wordpress and phpMyAdmin, these projects are basically victims of their own success.
I don't see how. The repository seems to be quite active and has plenty of current pull requests.
I don't doubt that Discourse requires more resources than most PHP forum packages do, but it doesn't need that much more.
1. Downloading the application archive and uncompressing it
2. Creating a MySQL database according to the documentation
3. Either editing a small config file to give the application the database credentials, or even just going to the application's index page and filling in the details on a first run experience
And... that's it. Rails has no comparable experience, unless -- like Discourse -- you put in a lot of work to get it there.
Laravel -- and Symfony -- work basically like other "modern" frameworks do, for both good and bad. Laravel has "Mix," built on webpack, for instance. So if you're looking for that in PHP, it's there, but that's kind of a tradeoff in the context of small sites deployed/managed by a single person -- a use case that I think modern webdevs sometimes lose sight of. If we go back to the example of forums, those are very often that "one person wants to host a forum for their community" kinds of things. (And I'd like to see more of us get back to self-hosted blogs -- which is part of what led me down the road of "can you write something in a not-PHP language that's still easy for someone who doesn't know anything about web development to deploy and run." The answer still seems to be "reply hazy; ask again later.")
As other posters have mentioned, PHP code can be as simple as uploading files to a folder on a server using a GUI FTP app. (And for some non-technical users, even that might be too complicated).
By the way, Jeff Attwood (co-founder of Stack Overflow and one of the founders of Discourse), had this to say about PHP:
"If you want to produce free-as-in-whatever code that runs on virtually every server in the world with zero friction or configuration hassles, PHP is damn near your only option." [1]
When did he say this? 2012.
It's now 2021 and has anything changed? Not really. Yes, we have Docker, Cloudtron, or Sandstorm etc but none of these are simple or easy to install or use. (A developer's definition of 'simple' and 'easy' bears no relation to the real definitions of these words).
Whatever you think of PHP, consider the following question: what language can match or beat PHP for ease of server-side deployment?
I mean I started laravel on shared hosting, why did I use laravel for most of my career? Because the job I was hired for was to build a custom CRM for a book business, I was learning Rails so I spent 2 weeks on a rails prototype...
Boss gave me access to their hostgator account - shared hosting and told me to install it there. I stared blankly at them, um... okay.
Rails version I built in didn't match and I couldn't figure out for the life of me how to make it work...
Laravel 4.2 was almost a complete 1:1 match (in terms of directory structure) to rails and the language was just a bit different so porting what I had to laravel was a cinch and I had it done in 3 days and up on hostgator. No problems.
Also if you're like me and you freelance/consult, there's a TON more business in existing software/legacy than there is in new builds. Wordpress, Shopify, Laravel, Drupal, Magento, Salesforce are probably the FAANG of freelance platforms to learn to earn income from.
PHP is also generally faster than Ruby, and with Swoole it's sooo much faster (even than elixir/phoenix), so really why not use laravel/php. There's also tons of great packages out there and tutorials. The community is freaking HUGE.
Rails you even have to roll your own auth system or use devise which is a PITA. Laravel it's more opinionated but it's built for you including 2fa, social/oauth, etc..
Which isn't to say I wouldn't use fancier langs, I'm jumping at the bit to build some backend apis in rust or go for the hell of it, but only when I'm the decision maker as CEO/CTO on a side-project. For bread and butter I'll stick w/ what I know I can get paid for which is PHP/Laravel/Wordpress/Vue/Livewire/etc.
What about that one guy who made https://remoteok.io/ using a single PHP file with no frameworks or libraries?
According to this live chart https://remoteok.io/open he made $88,000 last month from it alone with a 90%+ profit margin.
But more importantly it's a site that technically functions well and looks appealing. End users really don't care about which tech stack you used to build your site, they just want it to be fast, look nice and be easy to use which is achievable with pretty much any language or framework nowadays.
Many times when I've wanted to install something for my needs, like forum engine or something similar, I was looking only for an PHP option.
Why?
Because it really is a copy-paste process with typing credentials to your database into dedicated file. No need to know any language/framework-specific commands, and no need to be overwhelmed by missing dependencies.
And in huge addition to that, simple PHP hosting is extremely cheap - for years I've been paying for my personal server ~$20 PER YEAR, where servers that enables you to use Node/Ruby etc. costs around at least $10 per month. This is a huge game changer for me.
That's certainly how people deployed web apps built by other people a decade ago, but these days isn't it more common to use something like Docker?
Deploying a containerized app should be pretty much the same no matter what language it's written in. And Discourse does have a Docker container (https://github.com/discourse/discourse_docker), so I'm not sure the underlying language explains why it isn't popular.
Don't get me wrong, as a developer I hate the bloat, but as a UX/UI PoV you can install a lot of shit that's dockerized pretty easily...
sandstorm.io is a cool way to self-host open source projects for example
Most PHP apps out there are dump easy to use. That's not the case even for Python.
There's limitations and bloat involved with containers that I don't like. I'd rather just configure nginx/letsencrypt and create some bash scripts to make deployments work...
I'll often pair this with jenkins or come ci or use deployer for deployments that don't tear down the old until the new is green, and keeps a few snapshots, but personally I don't like docker much, even my dev environment uses nginx and no docker.
Docker probably is a better way of doing things, but it’s another layer.
In other words, they chose a tech stack which suited them as developers, and not which suited the end users of the software.
End users love PHP because you copy the files into a folder. That's why it's so popular. That fact that you are talking about architectural "elegance" shows how removed you are from understanding the needs of the end user.