TechBooky AI Assistant
TechBooky AI Assistant
👋 Welcome to TechBooky AI Assistant

I can help with:
🔎 Tech News
🤖 AI Topics
💻 Gadgets
☁️ Cloud
✍️ Guest Posts
📢 Advertising
🔗 Backlinks
📩 Newsletter
  • 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…
  • bluesky-social-app-inc-GettyImages-1252042401_537192_e2lpcg
    Bluesky Adopts Long-Form Content To Rival X Articles

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

  • Google’s Gemini Can Now Take Notes For You In Google Meet June 30, 2026
  • Cursor Brings Its AI Coding Agents to Mobile With New App June 30, 2026
  • TIDAL Moves to Block Payouts for Fully AI‑Generated Music June 30, 2026
  • OpenClaw Brings Its Agentic AI Apps to iOS and Android June 30, 2026
  • New Data Shows Heavy AI Users Are Hiring More Especially at Entry Level June 30, 2026
  • Report: Google Put Limits on Meta’s Heavy Gemini Usage After Token Surge June 29, 2026
  • UK Plans AI Face Scans To Judge Asylum Seekers’ Ages Despite Known Bias Risks June 21, 2026
  • Trump Reportedly Mocked Zuckerberg and Bezos After Their Private Messages. Were We All Watching a Tech Industry Loyalty Contest? June 19, 2026
  • Snap Launches $2,195 AR Glasses to Challenge Phones June 17, 2026
  • Android 17 Is Here and Google Wants Gemini to Run Your Entire Phone June 17, 2026
  • SpaceX Buys Cursor Maker Anysphere for $60 Billion in Bold AI Power Play June 17, 2026
  • Britain’s Under-16 Social Media Ban Could Redefine Big Tech’s Responsibility To Children June 15, 2026

Browse Archives

June 2026
MTWTFSS
1234567
891011121314
15161718192021
22232425262728
2930 
« May    

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.