Can you use NodeJS with WordPress?

A bizarre idea landed in my head the other day. What if you could somehow leverage NodeJS in your WordPress environment? Is it possible, would you even want to do that? Let’s explore.

Generally WordPress runs on Linux servers with Apache, also known as the LAMP stack because it features typically Linux, Apache, MySQL and PHP. NodeJS is an alternative and more recent way of setting up a server. So normally you won’t be able to run NodeJS on the same instance or server as what you have now for WordPress. Although technically there is probably a way (research was inclusive on this point) to run NodeJS alongside Apache somehow, the fact is it’s easier and more “going with the flow” to have a second instance that runs NodeJS and do whatever NodeJS stuff you want to do there.

Socket.io is mentioned as a technology that can help bridge WordPress and a NodeJS server. According to the socket.io project website this tool is designed to:

Socket.IO enables real-time, bidirectional and event-based communication. It works on every platform, browser or device, focusing equally on reliability and speed.

Socket.io

Research Credits

https://www.codeproject.com/articles/832760/making-a-wordpress-site-interactive-with-node-js

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *