SEO (Search Engine Optimisation)Software Engineering

I Migrated My Portfolio from React to Next.js – Here’s What Changed (And What I Wish I Knew Earlier)

Shariar Shishir•September 27, 2026•7 min read
I Migrated My Portfolio from React to Next.js – Here’s What Changed (And What I Wish I Knew Earlier)

For months, my portfolio site struggled to get meaningful visibility in Google.

I had built it with React (Vite), deployed it on shared hosting, and thought the job was done. It looked great. It worked perfectly. Clients who visited the link liked it.

But there was a problem: almost nobody was finding it through search.

After three months live, Google Search Console showed me the reality:

  • 78 impressions
  • 2 clicks
  • Very few meaningful search queries generating impressions

For a developer with 16+ years of experience and 100+ shipped projects, this was frustrating.


The Problem I Didn’t See Coming

My portfolio was a client-side React SPA. The initial HTML contained very little meaningful page content, so search engines had to process the JavaScript-rendered application before they could fully understand each route.

Google can render JavaScript, but relying heavily on client-side rendering adds another layer of complexity to crawling, indexing, and SEO—especially for a relatively new site.

There was another problem: every route initially relied on the same base HTML structure. Getting unique titles, descriptions, canonical URLs, and other page-specific metadata required additional handling.

Worse – every page served the same index.html. Same title tag. Same meta description. Same canonical URL. Whether you visited /services or /projects, Google saw identical metadata.

I tried workarounds:

  • A hidden #seo-content div with static HTML for crawlers
  • A PHP script (index.php) to dynamically inject meta tags before React loaded
  • Client-side usePageMeta hooks to update document.title and other metadata at runtime

Each workaround solved one problem while creating another.

The hidden SEO content could lead to duplicated content across routes. The PHP injection was essentially a workaround that became difficult to maintain. Runtime metadata depended on JavaScript execution.

At some point, I realized I was spending more time working around the architecture than improving the actual site.


The Decision

I had been avoiding Next.js because migration felt overwhelming.

My site had 16 components, a WordPress headless blog, a contact form with MySQL + email, custom animations, parallax effects, and page-specific JSON-LD schemas.

But after spending months adding SEO workarounds, I realized that a proper migration could actually be simpler than continuing to maintain them.

So I committed to it.

One weekend. Full migration.


What the Migration Actually Looked Like

The good news was that I didn’t have to rebuild the site from scratch.

What stayed the same:

  • All my existing React components (About, Hero, Projects, Contact, etc.)
  • All Bootstrap CSS and custom styles
  • Existing animations (react-awesome-reveal, react-countup)
  • WordPress headless blog integration
  • Most of the existing UI and business logic

What changed:

Before (Vite + React)After (Next.js)
react-router-dom routingFile-based routing with the App Router
usePageMeta() hookNext.js metadata API
PHP script for meta injectionBuilt-in SSR (Server-rendered metadata)
Hidden #seo-content divServer-rendered page content
Static sitemap.xml fileGenerated sitemap
index.html + index.phpNext.js layouts
Client-side blog fetchingServer-side data fetching

For most components, the changes were surprisingly small. I mainly had to decide which components needed 'use client' and replace React Router links such as <Link to= with Next.js <Link href=.

The blog pages were one of the biggest improvements.

Previously, the blog content was fetched from WordPress on the client side, so visitors initially saw a loading state while the data was being retrieved.

With Next.js, I could fetch the WordPress content on the server and generate the page with the content already available. This also made it much easier to provide page-specific titles, descriptions, Open Graph metadata, canonical URLs, and structured data.

The migration was much more about changing how the application was structured and rendered than rewriting the application itself.


The Results

I deployed the new version on Vercel and pointed my domain to it. The early Search Console comparison looked like this:

Before (React SPA — 3 months):

  • 78 impressions
  • 2 clicks
  • 2.6% CTR
  • Position 5.9

After (Next.js — 3 months):

  • 176 impressions (+125%)
  • 5 clicks (+150%)
  • 2.8% CTR
  • Position 5.4

That represents:

  • +125% impressions
  • +150% clicks

The numbers are still small, so I wouldn’t treat this as proof that Next.js alone caused the improvement. Search visibility is affected by many factors, and a few months of data from a relatively new site isn’t enough to draw a strong causal conclusion.

But the technical foundation changed significantly.

Google can now discover and process my pages with their actual server-rendered content and page-specific metadata.

More importantly, when I add a new page, I can build its SEO requirements directly into the page architecture:

  • Page-specific metadata
  • Canonical URLs
  • JSON-LD structured data
  • Sitemap entries
  • Server-rendered content

No hidden SEO content. No PHP metadata workaround. No client-side SEO dependency for the basic page information.


What I Wish I Knew Earlier

1. Don’t keep fighting your architecture.

I spent a lot of time building workarounds around my original SPA architecture.

In hindsight, changing the architecture was simpler than continuously maintaining those workarounds.

The migration itself took much less time than I expected.

2. Your React components are more portable than you think.

I was able to reuse most of my existing React components and styling.

The migration was largely about where and how the application renders, rather than throwing away everything I had already built.

3. Server-side rendering isn’t only about SEO

The benefits weren’t limited to search engines.

My blog pages no longer depended on a client-side loading state before displaying their main content. The overall experience became simpler and more predictable.

SEO was one reason for the migration, but the rendering model also improved the architecture of the application.

4. Choose the architecture based on the type of site.

If I were starting my portfolio today, I would choose Next.js rather than a Vite + React SPA.

Not because React or Vite is inherently bad for SEO, but because a portfolio is a public, content-driven website where routing, metadata, server rendering, and search visibility are important parts of the architecture.

For an internal dashboard or an application where most content sits behind authentication, the trade-offs can be very different.

5. Temporary SEO workarounds can become technical debt

Every workaround I added needed to be maintained, documented, and debugged.

What started as a quick fix gradually became another part of the system I had to think about.

Moving those responsibilities into the application architecture made the site much easier to maintain.


The Stack Now

  • Framework: Next.js (App Router)
  • Hosting: Vercel (free tier)
  • Blog CMS: WordPress (headless, on existing hosting)
  • Contact Form: Next.js API Route + Nodemailer + MySQL
  • Styling: Bootstrap 5 + custom CSS
  • Animations: react-awesome-reveal

The existing shared hosting still runs WordPress for the blog API, while the main portfolio application runs on Vercel.

The migration itself didn’t require any additional hosting cost.


Should You Migrate?

If you have a React SPA that represents a portfolio, business website, blog, or another public-facing site where organic search matters, moving to a framework with server-side rendering and built-in SEO capabilities can simplify the architecture.

But migration isn’t automatically necessary for every React application.

If you’re building a dashboard, internal tool, or authenticated application where there is little or no public content to crawl, the benefits can be much smaller.

For me, the decision made sense because my portfolio is both a website for potential clients and a demonstration of how I build web applications.

I wanted the architecture behind my own website to reflect that.

And, of course, I wanted people to actually be able to find it.


I’m Shariar Shishir – a Full Stack Developer with 16+ years of experience building WordPress plugins, Joomla extensions, Laravel SaaS platforms, and React applications. If you’re planning a similar migration or need help with a web project, feel free to connect with me.