Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8016447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T20:32:32+00:00 2026-06-04T20:32:32+00:00

I am switching my WordPress-powered website to a new server and changing domain names

  • 0

I am switching my WordPress-powered website to a new server and changing domain names at the same time, which means I have to find and replace many fields in my MySQL database.

Specifically, I must replace “olddomain.com” with “newdomain.com” whenever they appear in a field in MySQL such as “http://olddomain.com/?p=34”.

How can I do a massive find a replace in my MySQL database? I know that the LIKE SQL command can find fields with “olddomain.com” in them, but how do I replace specific portions of fields?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T20:32:33+00:00Added an answer on June 4, 2026 at 8:32 pm

    You can use this search and replace script for this purpose

    http://interconnectit.com/124/search-and-replace-for-wordpress-databases/

    As the author said raw replace is not good in these cases

    When you’re migrating WordPress (or any other platform using
    serialized PHP strings in the database) between domains, you must use
    a safe search and replace method that preserves the integrity of the
    serialized string lengths. A simple of a dump file for
    localhost to, for example, thenewdomain.com is
    problematic because the length of the string changes but the indexes
    for the serialized strings does not. Consequently settings are lost
    and widgets disappear. Not good.

    Referred in WordPress.org doc itself.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Switching to RightToLeft (by altering MainWindow.FlowDirection) changes strings which have a round (closing) paranthesis
I have a custom query in WordPress that is pulling a time assigned to
After switching to Rails 3, I noticed that I have to reboot my server
I have some code (it's part of a wordpress plugin) which takes a text
We are switching web hosts, and I have been asked to find out how
I have a blog on Wordpress in which I need to serve contents in
I'm switching a Wordpress site from Apache to Nginx. We're trying to obfuscate the
Switching to GCC for the first time, and I'm getting a bit confused by
After switching to a new mac at work, I tried to install APC as
I am developing a travels related website using cakephp. I have to put some

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.