OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

How to server WordPress site on express?

  • Thread starter Thread starter Common Sense
  • Start date Start date
C

Common Sense

Guest
I am working on a project through which i will be handling multiple WordPress websites through node and express server. I have an express server setup which has an API which allows client to create, update and customize a WordPress website along other things. after creating or updating (which is done through wp cli) the site is stored in a subfolder named website-name in a folder websites. Everything is working perfectly, except the api returns the url: (Yes, I am testing on localhost and i have also tried amazon ec2 instance. result being the same). This url is supposed to open the wordpress site but it doesn't.

I have also tried using http-proxy but not sure what's the right way to use it. Also, I have tried keeping the files in static but it too shows the error: Can't get / url. Any idea, how to serve the wordpress websites using the node and express server?

There are multiple websites, for example:

/websites/website_a_unique_identifier

/websites/website_b_unique_identifier


and inside All the wordpress files.
<p>I am working on a project through which i will be handling multiple WordPress websites through node and express server. I have an express server setup which has an API which allows client to create, update and customize a WordPress website along other things. after creating or updating (which is done through wp cli) the site is stored in a subfolder named website-name in a folder <em><strong>websites</strong></em>. Everything is working perfectly, except the api returns the url:<em>https://localhost/website-name</em> (Yes, I am testing on localhost and i have also tried amazon ec2 instance. result being the same). This url is supposed to open the wordpress site but it doesn't.</p>
<p>I have also tried using http-proxy but not sure what's the right way to use it. Also, I have tried keeping the files in static but it too shows the error: Can't get / url. Any idea, how to serve the wordpress websites using the node and express server?</p>
<p>There are multiple websites, for example:</p>
<p><em>/websites/website_a_unique_identifier</em></p>
<p><em>/websites/website_b_unique_identifier</em></p>
<p>and inside All the wordpress files.</p>
Continue reading...
 

Latest posts

Top