• AI Search
  • Cryptocurrency
  • Earnings
  • Enterprise
  • About TechBooky
  • Submit Article
  • Advertise Here
  • Contact Us
TechBooky
  • African
  • AI
  • Metaverse
  • Gadgets
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
  • African
  • AI
  • Metaverse
  • Gadgets
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
TechBooky
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Home Open source

How to Safely Migrate a WordPress Site to a New Server (Step-by-Step Guide)

Paul Balo by Paul Balo
March 25, 2025
in Open source, Tips
Share on FacebookShare on Twitter

6. Handling Serialized Data After URL Changes (Better Search Replace)

When changing URLs in the database, a simple find-and-replace can break data that’s stored in serialized format (a common storage format in WordPress options and widget data). Serialized data includes the string length of stored values, so if a URL length changes, the serialization needs to update too. For example, replacing “oldsite.com” with “newsite.com” changes the character count, and if not done carefully, it can corrupt the entry, causing plugin settings or widgets to break.

To safely update all instances of the old URL to the new URL in the database, use a tool that understands serialization. Fortunately, there are WordPress plugins and tools designed for this. A highly recommended one is the Better Search Replace plugin. Using Better Search Replace Plugin: Install and activate the Better Search Replace plugin on the new site (you can do this via WP Admin, or download the plugin files and upload them to wp-content/plugins/ if you can’t access admin yet). In WP Admin, go to Tools -> Better Search Replace. In the plugin interface, you’ll specify a search string and a replace string. Use your old site URL (e.g., oldsite.com) as the search, and your new site URL (newsite.com) as the replace. Select all tables (or at least all tables where URLs might appear – usually all WordPress tables). Run it as a dry run first (the plugin has a checkbox for “Run as dry run”) to see how many replacements it would make, without actually changing data​. If the results look plausible, uncheck dry run and run again to perform the replacements. This plugin will handle serialized fields properly, ensuring data integrity​

The Better Search Replace plugin provides a user-friendly interface to find all occurrences of the old URL in the database and replace them with the new URL, while safely handling serialized data. Using Better Search Replace will update URLs inside page content, widget data, settings, etc. For instance, image URLs in your posts that pointed to oldsite.com/wp-content/uploads/... will be changed to newsite.com/..., ensuring media and links aren’t broken. It will also catch things like GUIDs in the posts table, old domain references in some plugin options, and so on.

Alternate Tools: In lieu of a plugin, developers sometimes use WP-CLI’s search-replace command (which also handles serialization)​ or the third-party Search and Replace for WordPress Databases script​

. WP-CLI example:
wp search-replace 'oldsite.com' 'newsite.com' --skip-columns=guid --dry-run

then run without --dry-run to execute. This does essentially the same job. The plugin method is more accessible via a UI.

After running the search/replace, your new site’s database should have no references to the old domain (except perhaps in places like backup plugin records or historical data). At this point, if you visit the site on the new server’s URL, all links should point correctly to that URL. This is a major step in avoiding broken links or mixed content issues.

Note: If you kept the same domain name and are only changing hosts, you do not need to do a domain search-replace (since the domain is identical). However, if the site was in a different subdirectory on the old server and now in root (or vice versa), or if the URL protocol changed (http to https), a similar search-replace might be needed for those scenarios. Always back up the DB before running mass search-replace just in case.

Related Posts:

  • WordPress theme switch
    A Comprehensive Guide to Resolving File Permissions…
  • wp-speculative-loading-plugin-page-speed-e1712935040275
    WordPress Launches Speculative Loading Plugin To…
  • blog5f352fc3b2393_wp
    Hackers Exploit Popular WordPress Backup Tool Used…
  • https___dev-to-uploads.s3.amazonaws.com_uploads_articles_kqmbj9rjwqfghln5r5jv
    How to Convert SQL Server to Postgres
  • images (2)
    The Untold Story of WordPress and WP Engine's Clash
  • WordPress_blue_logo.svg
    WordPress Launches Revolutionary 100-Year Domain…
  • assets_task_01jrfxkvwqeexbx349fmgw9baz_img_0
    Schema Markup in WordPress: A Step-by-Step Guide to…
  • How-to-connect-to-EC2-instance-via-SSH-Linux-1
    Recovering SSH Access on AWS - A Step-by-Step Guide

Discover more from TechBooky

Subscribe to get the latest posts sent to your email.

Page 6 of 11
Prev1...567...11Next
Tags: tipswordpresswordpress migration
Paul Balo

Paul Balo

Paul Balo is the founder of TechBooky and a highly skilled wireless communications professional with a strong background in cloud computing, offering extensive experience in designing, implementing, and managing wireless communication systems.

BROWSE BY CATEGORIES

Receive top tech news directly in your inbox

subscription from
Loading

Freshly Squeezed

  • Samsung Profit Surges as AI Chip Demand Booms January 29, 2026
  • Meta Reports Strong Q4, Full-Year 2025 as Ad Revenue Surges January 29, 2026
  • Tesla’s Vehicle Margins Fall as Musk Focuses on AI and Robotics January 29, 2026
  • Microsoft Earnings Show Rising AI Spend, Cloud Under Scrutiny January 29, 2026
  • YouTubers Sue Snap Over Copyright Infringement in AI Models January 28, 2026
  • Sony Plans A State of Play Broadcast in February January 28, 2026
  • TikTok Avoids Trial, Settles Lawsuit Over Addiction Claims January 27, 2026
  • Ezra Olubi Sues David Hundeyin for ₦140M Over X Defamation January 27, 2026
  • Lagos & MTN Team Up on Eco-Friendly Obalende Bus Park January 27, 2026
  • France Ditches Microsoft Teams, Zoom for Homegrown ‘Sovereign’ Platform January 27, 2026
  • Meta Tests Premium Subscriptions on Facebook, Instagram & WhatsApp January 27, 2026
  • Microsoft Introduces New IT Admin Tool to Analyse Security Breaches January 27, 2026

Browse Archives

January 2026
MTWTFSS
 1234
567891011
12131415161718
19202122232425
262728293031 
« Dec    

Quick Links

  • About TechBooky
  • Advertise Here
  • Contact us
  • Submit Article
  • Privacy Policy
Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
  • African
  • Artificial Intelligence
  • Gadgets
  • Metaverse
  • Tips
  • AI Search
  • About TechBooky
  • Advertise Here
  • Submit Article
  • Contact us

© 2025 Designed By TechBooky Elite

Discover more from TechBooky

Subscribe now to keep reading and get access to the full archive.

Continue reading

We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.