PHP is horrible as a language, but it fills its niche very well:
* You can get it to run dang near anywhere.
* It has an extremely low barrier to entry for new devs (blessing and a curse).
* There's a large volume of code already out there.
* If you need something that's a little more than a static site but not a full blown custom system, it's one of the simplest ways to get something out the door.
* If you know how to use it, there's likely someone willing to pay you to do so on their behalf.
Eh, that's not really the case anymore either. It's made many improvements over the years. Not that I'm saying it's some wonderful language, but you can't really compare it to the PHP 4/early 5 days. I think credit is deserved to the folks who have brought PHP to where it is today.
Yes each of those websites still use PHP under the hood. But by that argument each of those websites can be counted as using C as well. As well as machine code.
It has nothing to do with the code being spaghetti or not. It's about a level of abstraction where I no longer consider something made with wordpress as something created with PHP. The PHP was allready created and then someone just clicked a few menus to choose what existing PHP he or she wanted.
The more fitting category would be just calling such websites "Wordpress" websites and not PHP websites.
In the enterprise world, very much so. PHP is super easy to deploy, requires little maintenance, and you can easily hire good admins to keep things running smoothly.
On the other hand, not even using a service like Heroku can save us from constantly having to patch or update the Rails apps.
So yeah, PHP is still a thing.