What are the top things to keep in mind while converting php website to nextjs website?

Next.js is a Javascript framework that enables React-based websites to do server-side rendering. This is completely different functionality than PHP, and they are different tools for different jobs.

You can port a PHP-based website to be written in back-end Javascript, instead, but it wouldn't actually be a line-by-line translation. You would be doing things different ways, and it would be more like a complete rewrite.

I can't imagine why anyone would want to take on such a task. If there's a portion of the site in which React or a JS framework makes more sense than writing the same thing in PHP, then just use JS for that portion of the site. Use the right tool for the job.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.