Next.js & Cpanel
In January, I hosted a Next.js project for a client on Cpanel. It was my first time doing so, and I wasn’t aware of some issues that later caused problems. I have previously worked with Next.js on different projects and deployed all of them on Vercel and never had any issues.
Get Reviterif’s stories in your inbox
Join Medium for free to get updates from this writer.
However, last week, the client’s website went down after three months of smooth operation, and I was unsure why. The person managing the Cpanel told me that the issue was related to my app’s performance and that it needed improvement. This prompted me to do some research to improve my app’s performance, during which I discovered Lighthouse, a helpful and user-friendly tool with several KPIs to measure app performance. I spent the whole day working on my site and improved its performance from a score of 39 to 90. I was pleased with the result and assumed all the problems would go away.
The following day, I uploaded the site to Cpanel with confidence, but to my dismay, not only was my website down, but my client’s other website was also down, something that had never happened before. I was devastated.
I spent the day doing more research and consulting with others to identify the problem. Eventually, I discovered that Cpanel is not well-suited for server-side rendering projects, which is Next.js’s core strategy. As a result, all the optimizations I had made earlier didn’t work because they were focused on improving server-side rendering performance.
To resolve the issue, I had to convert the project to a static website. Luckily, my website was an informative one, and Next.js made it simple to migrate to a static website.






