wordpress and node.js
NickName:Dejan Milosevic Ask DateTime:2012-12-29T00:41:54

wordpress and node.js

Is it possible to install wordpress and node.js server on same server maschine and use wordpress mysql database also from node.js? Also is it possible to have noSql also installed on thah server to use with node.js? I want to use wordpress for frontend for my portal, but all asynchronous work to do with node.js and reading some data from wordpress mysql and writing some to noSql. Can someone please help me with steps how to achive this for testing purposes.

Thank you for your time and best regards!

Copyright Notice:Content Author:「Dejan Milosevic」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/14072747/wordpress-and-node-js

Answers
brianreavis 2012-12-28T17:12:37

Right, it's possible. The only catch is that Apache (running Wordpress) and Node.JS can't bind to the same port. In other words, you'll need to have Wordpress running on port 8080 and Node running on 80 (or other different ports).\n\n\nInstall Apache, PHP, Node, NPM, MySQL, NoSQL...\nConfigure Apache to listen on the desired port. (8080?)\nInstall Wordpress & Start Apache.\nStart your Node application.\n\n\nAs for the precise steps involved to install those services, there are hundreds of guides online.",


JeffS 2012-12-28T17:21:58

If you're planning on using node for being accessed asynchronously by JavaScript that's being served by wordpress, then it will make your life considerably easier to have them running on the same host and port. What I've done in the past is set up the following:\n\n\nApache + PHP + Wordpress running on some port (8000?)\nNode + npm + ever other package you'll want running on some other port (9000?)\nHAProxy with some rules listening on port 80 which will decide based on the path which of the two servers to send requests to.\nA normal installation of MySQL and whichever NoSQL DB you pick.\n\n\nRecent versions of HAProxy can also terminate SSL, if you want to do the same with HTTPS on port 443.\n\nHere's a sample HAProxy configuration:\n\ndefaults\n log global\n maxconn 4096\n mode http\n option http-server-close\n timeout connect 5s\n timeout client 30s\n timeout server 30s\n\nfrontend public\n # HTTP\n bind :80\n use_backend node if { path_beg /services }\n # Everything else to Apache.\n default_backend apache\n\nbackend node\n server node1 127.0.0.1:9000\n\nbackend apache\n server apache1 127.0.0.1:8000\n",


More about “wordpress and node.js” related questions

wordpress and node.js

Is it possible to install wordpress and node.js server on same server maschine and use wordpress mysql database also from node.js? Also is it possible to have noSql also installed on thah server to...

Show Detail

WordPress and Node.js app on the same domain

I have a Node.Js app which runs fine once configured and started via cPanel. The root of the app is the '/' path, which is my domain name. I also have a WordPress installation from where I fetch blog

Show Detail

node.js serve a wordpress blog

I am using node.js on my rackspace server to serve my various applications. (Using node-http-proxy). However, i would like to start a wordpress blog. The only way to serve the blog is via apache (or

Show Detail

Integrate Wordpress into node.js website on Heroku?

I have a deployed production Saas business built using node.js framework running on Heroku Cedar (http://EasyNDA.com). Now I would like to have a well integrated blog (the hack that's on http://Ea...

Show Detail

Connect from WordPress webpage to a Node.js backend server

Being new to WordPress, I've been doing some research and yet I don't seem to be able to pinpoint a solution for my need. In short, I would like to allow a WordPress page to access a Node.js back...

Show Detail

Integrating node.js and express website with wordpress hosting

I have a website running on node.js and express, hosted on Amazon EC2 with a normal domain (e.g. www.example.com) We want to add a blog to the website. We would like the blog route to be www.exam...

Show Detail

Authenticate requests in node.js against Wordpress

I have a Wordpress site and a node.js application which together form the web application I'm building. I'm using Node because of socket.io and Wordpress for a lot of other reasons. Either way I cant

Show Detail

Wordpress authentication in node.js

What is the best way to allow a user to use a node.js app using their user account from a Wordpress page? I have tried storing session information in Redis, but I am not very familiar with PHP and...

Show Detail

How do I run Node.js code in a Wordpress plugin?

I am working on a Wordpress plugin that let's an admin add a button that runs some Node.js code. I can't figure out how to run Node.js code through a plugin. Is there a good place to start?

Show Detail

node.js app endpoints behind apache wordpress website

I have a WordPress website (mywebsite.com) running on a shared hosting server. Alongside, I made a node.js app running in the backend on port 3000, which has been programmed to have different API

Show Detail