(Cross-posted from my blog on http://evangelists.intel.com)
Don't think of WordPress as a blog engine. Think of it as an open source Content Management System (CMS). As such, it provides the code for a significant part of the web. I've heard that anywhere between 25 and 30% of the world's websites are powered by WordPress. So a serious change to WordPress means a significant change to the web.
WordPress also sets the standard for PHP performance. There is an open source benchmark available for different releases of WordPress which works for both PHP and Facebook's open source PHP alternative, HHVM. The PHP and HHVM open source communities compete on who has the best performance on this WordPress benchmark. It's not the only comparison, but it's one that gets noticed.
Upon further reading it turns out that only the WordPress administration interface has been changed to Node.js from PHP. The WordPress core engine remains in PHP and is unlikely to change soon. This is because of a rich ecosystem of WordPress plug-ins, which have maintained compatibility for something like five years.
What does Node.js have going for it which makes it attractive for WordPress as an alternative to PHP? I talked with our Node.js lead, Uttam Pawar, who has worked on both PHP and Node and he gave up a list of advantages:
- Pages are rendered on the client rather than the server. This is particularly noticeable for an interactive page like the administration interface of WordPress. So as one clicks around in the web interface, you don't need a network round trip with the server to get a response to clicks.
- Code is cached on the client. Communication between client and server can be with JSON objects. This means that on a slow network connection you should see better performance. I'm writing this blog entry on an airplane with a typically slow wifi connection. However the WordPress.com administration interface is noticeably faster than it would have been otherwise.
Will the core of WordPress ever move from PHP to Node.js? They would certainly need to figure out a way to support the WordPress plugin legacy. But a future RESTful API for the WordPress core might constitute a further move away from PHP.