Next.js Discord

Discord Forum

How to upload Next14 built website to Hostgator server using cPanel?

Unanswered
Goldstripe sardinella posted this in #help-forum
Open in Discord
Goldstripe sardinellaOP
Hi,

I remade an institute's website (previously written using Wordpress) using NextJS 14.

The hosting provider is Hostgator. Previously the plan was of shared linux hosting. However, after talking to the support team, they suggested buying a VPS based plan which has the root access. I went ahead and bought the plan. Using cPanel, I uploaded the ZIP folder of the project under 'public_html' folder. Since the nameservers had been changed recently I was asked to wait for two days for the results to be visible but it has been three days and I keep seeing the 'index of' screen on the domain (photo attached).

Upon talking to the support staff again, they told me that the project does not consist index.html file. However, my project's been running just fine on Netlify.

I have no idea about how to deploy the website to a server using cPanel and I understand that there is a knowledge gap. Please let me know what could be the possible solutions.

2 Replies

Toyger
with cpanel you'll not be able to host it , you can host there only statically exported nextjs which is rarely the case.
you need to get rid of cpanel on your vps.
here is ok tutorial for self-host https://medium.com/@zay_kyoy/deploy-nextjs-app-on-vps-20aedfbed3d1
tutorial made for debian. Ubuntu can be fine too.
Goldstripe sardinellaOP
I am using Hostgator as the hosting provider and they have a plan called VPS Linux KVM which has cPanel using which I can upload my project. Unfortunately, I don't think I can get rid of the cPanel on this VPS.

Thanks for sharing the link. I will go through it and understand how I can do it myself.