WEB DEVELOPMENT

How to migrate a WordPress site to Next.js without losing key URLs

Inventory old URLs, map permanent redirects, migrate content carefully and test public pages to protect enquiries during a WordPress to Next.js move.

Nigerian web team planning a website migration and URL redirects
01

Preserve the user’s destination, not just the domain

A WordPress to Next.js migration can succeed technically while valuable pages disappear for clients and search engines. Start with a complete inventory of the current URLs and the job each page performs. Include articles, service pages, author pages, downloadable resources, category archives with real traffic and campaign landing pages. Compare that inventory with the planned Next.js routes before developers begin building redirects.

Export the WordPress sitemap, crawl the live site, and review actual landing pages in Search Console and analytics where access is available. Include URLs linked from advertisements, social profiles, email signatures and important third-party sites. For each address, record its title, purpose, traffic or enquiries, backlinks, owner and proposed destination. An old page missing from navigation may still bring a diaspora client to a consultation.

02

Choose the content and route strategy together

Decide which WordPress posts should move substantially intact, which require an update, and which can be consolidated into a stronger guide. Give each retained page a destination that serves the same user need. For instance, an old guide to Lagos land searches should reach a current guide to land searches, not a generic homepage. If two articles are merged, document the content retained and the reason the new page answers both intents.

Do not automatically import unreviewed HTML into a new CMS. Inspect headings, links, images, captions, author names, publication dates, citations and calls to action. Rich text can lose tables or links during conversion. Have an editor approve a representative sample in the actual Next.js template before moving the complete archive. Record any changed headline and explain it in the mapping sheet.

03

Build and test the redirect map

For each old URL, specify its final new URL and the permanent redirect response to use where the move is lasting. Google's migration guidance recommends server-side permanent redirects such as 301 or 308 for permanent moves. Test the exact status and destination, including trailing slashes, case, www, HTTP, URL encoding and query strings where they carry meaning. Keep the path as direct as practical; a chain of several redirects is harder to monitor.

Test high-value URLs first, then sample each route pattern and audit every exception. A rule from /blog/old-slug to /insights/new-slug should only run if that new page exists and answers the old request. Avoid sending all removed pages to the homepage. Keep a documented not-found response for genuinely retired material without a useful replacement. Update internal links to their final destination rather than relying on redirects.

04

Preserve page meaning and metadata

Check that the Next.js site renders a distinct title, meta description, primary heading and canonical URL for every retained page. Ensure important article content is available to a visitor and crawler without a broken client-side request. Migrate descriptive image alt text and give images appropriate dimensions. A design review should inspect mobile reading, navigation, forms and speed as well as appearance.

For content stored in Sanity or another CMS, confirm the production dataset, document type and slug used by the deployed website. Test a published record end to end: CMS entry, application fetch, public route, indexable response, canonical and sitemap entry. A successful CMS publication does not prove the public page works if the website is querying an old dataset or filtering by the wrong field.

05

Prepare a safe release and rollback

Take a backed-up copy of the WordPress database and media and keep a read-only inventory of existing routes. Assign owners for DNS, deployment, redirects, editorial review, forms, analytics and contact enquiries. Create a staging environment and test it without exposing unfinished pages to search. Plan the launch window around the business's ability to respond if an enquiry form fails.

Before changing the domain, test representative transactions: a visitor reaches a guide through an old link, reads the new page, submits an enquiry, and receives the expected confirmation. Agree what would trigger a rollback, who has deployment access and how DNS or the previous application would be restored. Keep an issue register with severity, owner and resolution time so the team can distinguish launch blockers from later enhancements.

06

Measure the migration after launch

At launch, fetch a sample of old and new URLs and confirm the correct redirects and live page status. Check the updated sitemap, canonical tags, robots rules and structured data. Submit the sitemap in Search Console and watch coverage, impressions, queries and pages; compare equivalent periods with care because indexing and traffic fluctuate. Check form completions directly in the CRM or inbox, not solely in analytics.

Review errors from server logs and broken-link reports daily during the early period. If a high-value old URL becomes a 404, map it to the relevant live replacement. If an article is in the CMS but absent publicly, trace the data request and publication filter before creating a duplicate. Preserve old redirects for an extended period; Google's site-move guidance generally recommends at least one year. ChamanTech Solutions can plan and implement the inventory, route map, content migration and launch checks for a Nigerian business.

07

Sources and further reading

Google Search Central, site moves and URL changes: https://developers.google.com/search/docs/crawling-indexing/site-move-with-url-changes. Review the documentation for the current Google guidance at the time of migration; the correct plan depends on your site architecture and existing URLs.

← Explore more ChamanTech articles

LET'S WORK TOGETHER

Ready to make progress?

Tell us what you are planning. We will review your enquiry and discuss a practical way forward.

Discuss Your Project