How to reconnect with WP site after migrating from WP to Node.js backend in DO

Posted November 27, 2020 477 views

Hi, I am hoping someone can help me with my problem.
So I had a website running on wordpress, with the Cloudflare DNS and GoDaddy as the domain provider. It was live for about a month, and I decided that I wanted to run my own server on nodejs, So I created an express app in DO and updated the Cloudflare DNS to redirect the domain name to the new IP Address from Digital Ocean and now it is working fine. But our issue now is how can I access the old wordpress pages and the wordpress panel? My goal is to be able to have a separate path in the website e.g<path> which connects to the wordpress pages so that when I do<path>/wp-admin I can connect with the existing word-press pages.
Any help would be appereciated

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi @nicholasbudiharsa,

I’m not sure this is possible using the same domain name. The best way would be to migrate the WordPRess website to your DigitalOcean droplet and put it in a folder like so<path>/.

This is what I would have done. The way you are searching an answer for is impossible because your domain can load from only one IP, your Droplet’s IP or your WordPress website’s IP so you need to either move your NodeJS application to the WordPRess platform or you need to move your WordPress website to your DigitalOcean Droplet. Since the first is impossible, I’ll suggest the second option.


Though @KFSys solution seems to be the most convenient, you could consider reverse proxy configuration to proxy location<path> to GO Daddy’s host IP. Something like this:

e.g. in nginx server block
location /test1 { proxy_pass http://go_daddy_ip; }

However, it is very likely you would have to change your node.js/express configuration as well in that case.