Hi,
I have a Droplet with WordPress set up and running smoothly. Now, I’d like to host a Next.js application on the same Droplet. I’ve tried various approaches but seem to be stuck. Could you provide a guide or recommend an article to help me with this setup?
Thank you!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Heya,
I would like to recommend you to check the droplet’s performance once both Next.js and the WordPress site are under traffic to ensure the droplet’s resources are enough to handle both applications.
Both WordPress and Next.js can be resource-intensive, particularly if your site has high traffic. If one application consumes too much CPU or RAM, it can negatively impact the performance of the other. This might lead to slow page load times, increased server response times, or even downtime if the server becomes overloaded.
Also running two applications means more disk space usage for files, databases, logs, and backups. Ensure your Droplet has sufficient disk space, especially if you have a media-rich WordPress site or a large Next.js build.
Hope that this helps!
Heya @massivelightseagreenurchin,
It really depends on what WebService you are using - Nginx/Apache.
Since Next.js uses nodejs it runs on a specific port. You’ll need to create a reverse proxy to server your app. Both are applicable and usable with that it just depends on what you are using.
If you are using Nginx, you’ll need to create the following Nginx conf:
Here is an example config if you are using Apache
Hope this helps!