Using WordPress as a Headless Backend with Next.js Frontend
Hi everyone,
I’m planning to convert an old WordPress site into a faster, modern setup using Next.js as the frontend while keeping WordPress as the backend (headless CMS).
Here’s the architecture I have in mind:
Main domain will serve the Next.js frontend
WordPress will be installed on a subdomain (e.g., api.example.com)
I’ll create custom API endpoints in WordPress (REST API)
Next.js will fetch data from those endpoints and render the frontend
The goal is to significantly improve performance and user experience while still allowing the client to manage content easily via WordPress admin.
My questions:
Is this architecture reliable and scalable for production?
Are there any major SEO or performance concerns with this setup?
What are the best practices for caching and API optimization in this case?
Should I rely on the default WP REST API or build fully custom endpoints?
The client specifically wants a much faster version of their existing WordPress site without losing the CMS flexibility.
Has anyone implemented a similar setup? Any advice, pitfalls, or recommended tools/plugins would be really helpful.
Site slow when he pubished 10000+ product with using more than 10 plugin. I have checked that per product image wp automatically create 5-7 images from single image. so 10k product makes 70-80k image file so huge big site which is very hard to handle, that's why he asked me solution