/handbook/sanity-to-wordpress-migration/migration-process/
What We Do
Digital Platform MigrationsKey SolutionsManaged ServicesStaffing SolutionsIndustriesProducts
OnePress
Unify multiple brands on one governed WordPress platform.
Design & UI/UX
Gutenberg-native UX, UI, and design systems for visitors and editors.
WordPress Modernization
Modernize WordPress for better performance, architecture, and AI readiness.
WordPress as a DXP
WordPress as a composable DXP when monolithic systems no longer cut it.
Headless WordPress
Omnichannel content delivery without sacrificing marketing autonomy.
Frappe/ERPNext
Build scalable ERP and custom applications, from implementation to ongoing support.
Discovery
Strategic consultancy & project roadmap
Growth Services
On demand development & consultation
Site Maintenance
Annual maintenance. Done for you
QE Services
Testing across SDLC for assured quality
Hosting Migration
Move to a performant hosting with zero downtime
WooCommerce
Enterprise commerce delivered without lock-in
AI
Unlock real use cases and integrations
All Services
A suite of services for any need
Technology STACK
eCommerce
Scale your e-commerce with WooCommerce, integrations, and custom extensions for growth.
EasyEngine
Server management tool that makes using WordPress on Nginx easy.
Web Auditor
Performance Audit & Insights for your Website.
rtMedia
A complete media management plugin for WordPress.
Resources

About Us

CLEAR
Resources
Sanity to WordPress migration guide
Frontend, backend & content migration
Topics
On this page
- Sanity to WordPress migration guide
- Business case for migration
- Migration process, timeline & team
- Planning the migration
- Pre-migration setup
- Frontend, backend & content migration
- Quality assurance
- Site launch
- Post-migration checks
- How can rtCamp help
Migrating frontend
Selecting a new WordPress theme
Adapting or creating a custom theme
Migrating content & media
Preparing WordPress for content import
Running the import command
Handling media during the import
Hands-on demonstration
Migrating backend
Setting up WordPress for headless use
Mapping and recreating custom functionalities
Streamline your headless WordPress setup with SnapWPđź«°
Last updated on Apr 1, 2026
Sanity to WordPress migration: Migration process
After completing content mapping and transformation, you may choose to migrate your frontend to WordPress. With a headless WordPress setup, moving the frontend itself is optional. If you’re using WordPress only as a content API and handling the frontend separately (for example, with a JavaScript framework), you can skip this step.
Migrating frontend
However, if you plan to serve your frontend from WordPress, here’s what to consider
Selecting a new WordPress theme
WordPress offers over 13,000 free themes, providing a wealth of design choices. You can select a theme that closely matches your site’s aesthetics and then adapt it for headless delivery. This approach often speeds up the process since you’re starting with a pre-built design.
Adapting or creating a custom theme
If none of the available themes meet your needs, you might opt to develop a custom theme. This involves:
- Replicating the look and feel of your Sanity-driven site.
- Creating reusable Gutenberg blocks and templates that mirror your existing components.
- Ensuring the theme is optimized for headless delivery, meaning it effectively interacts with WordPress APIs to serve content.
Remember
Migrating the frontend is flexible and depends on your project requirements. If your primary goal is to use WordPress solely for content management (headless mode) and maintain an external frontend, you may choose to bypass this step entirely.
This phase gives you the freedom to decide how closely integrated your frontend should be with WordPress, based on your business needs and technical strategy.
Migrating content & media
Once the backend setup is complete, the next critical step is to migrate your content and media from Sanity to WordPress. This process involves transferring textual data, images, videos, and associated metadata while ensuring that relationships and SEO value are preserved. Let’s break down how this is done, step by step.
Preparing WordPress for content import
Before importing any content, start with a fresh WordPress installation. This clean slate ensures that no legacy data interferes with the migration. Next, install and activate a custom plugin such as “Sanity to WordPress Migration” which is specifically designed to handle your import process. This plugin will automate much of the work needed to transfer data and media from Sanity into WordPress.

Running the import command
With the plugin activated and your content mapped and transformed into a clean JSON format, you can now import your data. Here’s how you do it:
- Open your command line interface (CLI).
- Run the import command provided by the plugin. For example:
wp sanity-to-wp import u002du002dsource=cleanData.jsonn(Note: Replace u002du002dsource=cleanData.json with the actual command details as needed.)
This command reads the transformed JSON data and imports all relevant content into your WordPress setup. It creates posts, pages, or custom post types, sets metadata, and maintains content relationships as defined in your mapping strategy.
Handling media during the import
As content is imported, the plugin or script also handles media assets:
- Downloading assets from Sanity: The script fetches images, videos, and other media files referenced in your content.
- Uploading to WordPress: These files are then uploaded to the WordPress Media Library, ensuring they are stored and managed within the new system.
- Updating URLs: The process updates URLs within your content to point to the new locations of media on WordPress, preserving internal links and references.
By carefully managing both textual content and media, this migration step ensures that your site’s visuals and functionality remain intact in WordPress.
Hands-on demonstration
For a practical demonstration, watch the following video where we:
- Install and activate the “Sanity to WordPress Migration” plugin.
- Run the import command to transfer blog content.
- Observe how media files are handled during the process.
Watch this demonstration to see the import process in action.
![]()
Important note: The video covers a basic scenario focused on migrating blog content. In a real-world enterprise migration, the process may involve handling various content types, complex relationships, and additional optimizations. This example serves as a simplified introduction to help you understand the core steps.
Having successfully migrated your content and media, you now have a WordPress site populated with data from Sanity.Â
Migrating backend
Backend migration focuses on transforming WordPress into a robust content engine that replicates and enhances the functionality of your existing Sanity setup. For enterprise websites, this involves handling complex custom features, workflows, and integrations. Let’s explore this process in detail.
Setting up WordPress for headless use
The first step is configuring WordPress for a headless environment, tailored to enterprise needs:
Headless configuration
- Install WordPress on your chosen hosting environment, ensuring it is optimized for scalability, security, and performance.
- Disable the traditional front end if not needed, focusing solely on WordPress’s role as a content API.
- Activate essential plugins for headless operation, such as WPGraphQL or REST API enhancements, to facilitate robust data delivery.
Security and performance optimizations:
- Implement security measures (firewalls, SSL, regular updates) to protect sensitive enterprise data.
- Configure caching mechanisms, database optimization, and CDN integrations to handle high traffic and large datasets efficiently.
- Set up automated backups and monitoring to ensure system reliability during and after migration.
Mapping and recreating custom functionalities
Enterprises often leverage custom features in Sanity that need to be replicated in WordPress. This step involves:
Listing current functionalities
- Conduct a thorough review of your Sanity backend to identify all custom content types, workflows, integrations, and third-party connections.
- Document features such as custom post types, special taxonomies, unique fields, tailored editorial workflows, and API integrations with other systems like CRMs, ERPs, or marketing automation tools.
Recreating functionalities in WordPress
Use WordPress plugins or custom development to recreate these features. For instance:
- Custom post types and fields
Register equivalent custom post types and custom fields using WordPress functions (register_post_type, register_taxonomy) or plugins like Secure Custom Fields (SCF) to mirror Sanity content structures. - Custom workflows
If Sanity uses specific workflows for content approval or publishing, replicate these using WordPress editorial plugins (e.g., Edit Flow, PublishPress) or custom code to ensure similar processes and approvals. - API and integration mapping
Analyze how Sanity interacts with external systems. Rebuild or adapt these integrations in WordPress using its REST or GraphQL APIs, webhook listeners, or dedicated plugins. For example, if your Sanity setup connects to a CRM, set up a corresponding connection in WordPress using available CRM plugins or custom integration scripts. - Multilingual and personalization features
For enterprise sites with multilingual content or personalized experiences, configure WordPress multisite or multilingual plugins (e.g., WPML, Polylang) and personalization tools to match Sanity’s capabilities.
Ensuring smooth integration with existing systems
Enterprise environments often involve complex ecosystems of tools:
- Third-party integrations
Evaluate each third-party service integrated with Sanity. Decide whether to use existing WordPress plugins, develop new integrations, or adapt workflows to ensure these services continue to function seamlessly after migration. - Data consistency and migration strategies
Plan for data consistency between WordPress and other systems. This might involve setting up scheduled synchronization, using middleware, or crafting custom scripts to handle edge cases during the transition.
Finalizing backend setup
After mapping and recreating custom functionalities:
- Test each feature extensively in the staging environment to ensure that it replicates Sanity’s behavior.
- Validate API responses, workflow automations, and integration points to catch any discrepancies.
- Optimize configurations based on testing feedback, focusing on performance, security, and reliability.
By breaking down the backend migration into these detailed steps, we ensure that an enterprise-level Sanity to WordPress migration addresses all complexities. This comprehensive approach guarantees that WordPress not only replicates Sanity’s features but also leverages its strengths, resulting in a robust, scalable, and integrated backend environment ready to support your business needs.Â
Streamline your headless WordPress setup with SnapWP**đź«°**
If you prefer to use a frontend library other than WordPress or seek consistency between your backend and frontend, consider SnapWP. Unlike Sanity, SnapWP offers an immediate, fully functional frontend in a headless setup, reducing development and deployment efforts. This efficiency allows you to focus on creating engaging user experiences without the complexities often associated with headless CMS implementations.Â
Discover how SnapWP is transforming headless WordPress.
The next phase is testing to ensure that everything works as expected and that the site performs optimally post-migration.
Credits
Shreya Agarwal
Author
Shreya Agarwal
Author
Shreya Agarwal is a Growth Engineer at rtCamp, she brings active, hands-on WordPress development credentials to everything she writes and reviews. A WordPress Core Contributor with merged pull requ…
Good Work. Good People.
Industry partnerships


Compliance certifications
United StatesÂ
India
© rtCamp Inc. since 2009. All rights reserved.
Terms of Service · Privacy Policy · Trust Center
Company
Solutions
Subscribe to Campfire for fresh insights and stories from people behind rtCamp
Δ
Email(Required)
Submit
United StatesÂ
India
© rtCamp Inc. since 2009. All rights reserved.
Terms of Service · Privacy Policy · Trust Center
Cookie Consent
We value your privacy
We use cookies to give you the best possible experience. By clicking “Accept,” you consent to our use of cookies to improve site functionality, analyze usage, and personalize content and communications. Your privacy matters to us, and we are committed to handling your data responsibly and transparently. Please check our Privacy Policy for more details.
Manage PreferencesDon’t AllowAllow All
Why do we use cookies?
Ă—
By clicking "Accept" or "Decline All" at the bottom, you consent to the use of cookies and other tools as described in our Cookie Policy in accordance with your settings and accept our Terms of Service.
Toggle EssentialEssential
Essential cookies enable basic functions and are necessary for the proper function of the website.
Name
Description
Duration
Geolocation Config
This cookie is used to store the consent settings based on the visitor's location.
30 days
Cookie Preferences
This cookie is used to store the user's cookie consent preferences.
30 days
Toggle CloudFlareCloudFlare
CloudFlare provides web performance and security solutions, enhancing site speed and protecting against threats.
Service URL: developers.cloudflare.com (opens in a new window)
Name
Description
Duration
cf_clearance
Whether a CAPTCHA or Javascript challenge has been solved.
session
Toggle CommentsComments
These cookies are needed for adding comments on this website.
Name
Description
Duration
comment_author
Used to track the user across multiple sessions.
Session
comment_author_email
Used to track the user across multiple sessions.
Session
comment_author_url
Used to track the user across multiple sessions.
Session
Toggle GodamGodam
GoDAM" is primarily a specialized WordPress plugin and media management service designed to enhance video hosting, marketing, and asset management directly within the WordPress dashboard.
Service URL: godam.io (opens in a new window)
Name
Description
Duration
user_image
Temporarily stores the path to the user's avatar or profile picture for quick rendering in the website header.
session
user_id
Stores the numerical ID of the logged-in user to maintain session continuity and basic site operations.
session
full_name
Stores the logged-in user's display name to personalize the site interface without needing database queries.
session
system_user
First-party cookie used to store basic application state identifying the current system user role.
session
sid
A generic session ID cookie used to maintain user state and functionality as the visitor navigates through the site.
session
Toggle Google reCAPTCHAGoogle reCAPTCHA
Google reCAPTCHA helps protect websites from spam and abuse by verifying user interactions through challenges.
Name
Description
Duration
_GRECAPTCHA
Google reCAPTCHA sets a necessary cookie (_GRECAPTCHA) when executed for the purpose of providing its risk analysis.
179 days
Toggle Google Tag ManagerGoogle Tag Manager
Google Tag Manager simplifies the management of marketing tags on your website without code changes.
Name
Description
Duration
cookiePreferences
Registers cookie preferences of a user
2 years
td
Registers statistical data on users' behaviour on the website. Used for internal analytics by the website operator.
session
Toggle StatisticsStatistics
Statistics cookies collect information anonymously. This information helps us understand how visitors use our website.
Toggle Factors AIFactors AI
Factors.ai is a B2B account intelligence and marketing analytics platform that helps Go-To-Market (GTM) teams identify anonymous website visitors, track buyer journeys, and measure the ROI of marketing campaigns.
Service URL: www.factors.ai (opens in a new window)
Name
Description
Duration
_fuid
It is sent to capture session details and track user behavior across your website to provide behavioral data and intent signals.
1 Year
Toggle Google AnalyticsGoogle Analytics
Google Analytics is a powerful tool that tracks and analyzes website traffic for informed marketing decisions.
Service URL: policies.google.com (opens in a new window)
Name
Description
Duration
FPGSID
Stores a session or user identifier to track how visitors interact with a website. This helps Google Analytics measure website performance, user engagement, and usage patterns.
Session
FPLC
Used by Google Analytics to link visitor interactions and sessions across multiple related domains.
20 hours
FPID
A server-side Google Analytics cookie used as an alternative user identifier when third-party cookies are restricted.
2 years
_ga
ID used to identify users
2 years
_ga_
ID used to identify users
2 years
Toggle Jetpack StatsJetpack Stats
Jetpack's built-in visitor analytics. It records page views, referring sites, search terms, and outbound link clicks, and also carries the shared visitor-tracking library used by Jetpack Instant Search and WooCommerce Analytics.
Service URL: automattic.com (opens in a new window)
Name
Description
Duration
tk_aip
Stores a list of anonymous visitor IDs so they can be merged into one identity once a visitor is recognized.
Up to 5 years
tk_tc
Used once per page load to work out which cookie domain the Tracks library should use, then removed as soon as it's read back.
Session (deleted immediately after use)
tk_qs
Queues analytics events for Jetpack's Tracks library so none are lost if the page closes before they can be sent.
30 minutes
tk_ai
Stores a randomly-generated anonymous visitor ID so Jetpack's Tracks analytics library can link tracking events to the same visitor.
Session in wp-admin; up to 5 years on the frontend
Toggle Microsoft ClarityMicrosoft Clarity
Clarity is a web analytics service that tracks and reports website traffic.
Service URL: clarity.microsoft.com (opens in a new window)
Name
Description
Duration
CLID
Identifies the first-time Clarity saw this user on any site using Clarity.
12 months
ANONCHK
Indicates whether MUID is transferred to ANID, a cookie used for advertising. Clarity doesn't use ANID and so this is always set to 0.
Session
_clck
Persists the Clarity User ID and preferences, unique to that site is attributed to the same user ID.
12 months
_clsk
Connects multiple page views by a user into a single Clarity session recording.
12 months
Toggle Parse.lyParse.ly
Parse.ly is a content analytics platform that helps publishers optimize audience engagement and content performance.
Name
Description
Duration
_parsely_session
JSON document storing information identifying a browsing session according to Parsely’s proprietary definition
30 minutes
_parsely_visitor
JSON document uniquely identifying a browser and counting its sessions
13 months
cookies.js_dtest
This cookie determines whether the browser accepts cookies.
session
Toggle MarketingMarketing
Marketing cookies are used to follow visitors to websites. The intention is to show ads that are relevant and engaging to the individual user.
Toggle Bing / MicrosoftBing / Microsoft
Bing, powered by Microsoft, is a search engine providing web, image, video, and map search capabilities.
Name
Description
Duration
MR
Used to collect information for analytics purposes.
6 months
ANONCHK
Used to store session ID for a users session to ensure that clicks from adverts on the Bing search engine are verified for reporting purposes and for personalisation
10 minutes
SM
Used by Microsoft in synchronizing the MUID across multiple Microsoft domains to track users for advertising.
session
MUID
Identifies unique web browsers visiting Microsoft sites. These cookies are used for advertising, site analytics, and other operational purposes.
1 year
Toggle DoubleClick/Google MarketingDoubleClick/Google Marketing
A comprehensive digital advertising platform for managing campaigns, optimizing performance, and analyzing audience data.
Name
Description
Duration
IDE
This cookie is used for targeting, analyzing and optimisation of ad campaigns in DoubleClick/Google Marketing Suite
2 years
ar_debug
Store and track conversions
Persistent
Toggle LinkedInLinkedIn
LinkedIn is a professional networking platform for job seekers, employers, and industry connections.
Name
Description
Duration
bscookie
Used by LinkedIn to track the use of embedded services.
1 year
AnalyticsSyncHistory
Used to store information about the time a sync with the lms_analytics cookie took place for users in the Designated Countries
30 days
bcookie
Used by LinkedIn to track the use of embedded services.
1 year
li_sugr
Used to make a probabilistic match of a user's identity outside the Designated Countries
90 days
lidc
Used by the social networking service, LinkedIn, for tracking the use of embedded services.
1 day
UserMatchHistory
Used by LinkedIn Ads to synchronize and match user IDs across different ad networks and data providers.
30 days
Toggle LinkedIn InsightLinkedIn Insight
LinkedIn Insight is a web analytics service that tracks and reports website traffic.
Service URL: www.linkedin.com (opens in a new window)
Name
Description
Duration
li_sugr
Used to make a probabilistic match of a user's identity.
90 days
lidc
Used for routing and session management.
24 hours
Toggle LiveIntentLiveIntent
LiveIntent provides a platform for email advertising and identity-driven marketing solutions.
Name
Description
Duration
_lc2_fpi_js
Companion cookie to _lc2_fpi used by JavaScript to facilitate cross-domain ad tracking and user identification.
1 year
_lc2_fpi
First-party tracking cookie usually associated with LiveRamp to identify users across devices for targeted advertising.
1 Year
_li_ss
Sets a unique ID for the visitor, that allows third party advertisers to target the visitor with relevant advertisement. This pairing service is provided by third party advertisement hubs, which facilitates real-time bidding for advertisers.
1 month
lidid
Collects data on visitors' behaviour and interaction - This is used to make advertisement on the website more relevant. The cookie also allows the website to detect any referrals from other websites.
2 years
Toggle Cookie PolicyCookie Policy
You can find more information in our Privacy Policy.
Allow AllDecline All
Accept





