Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Is there a query I can run on my wordpress database so that I can change all instances of

www.mydomain.com

to

localhost/mylocalsite.com?
share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Try this plugin: http://wordpress.org/extend/plugins/search-and-replace/ - It helped me dozens of times.

Or try this query:

UPDATE tablename SET tablefield = replace(tablefield, "findstring", "replacestring");

Or try this method, dump the database, open the SQL file, do a find and replace in a text editor then reimport it.

Take care to backup your database prior to making any operations and changes!

share|improve this answer
    
The last method sounds good to me, thanks! –  redconservatory Jul 26 '11 at 21:08
    
You're welcome! –  Ciprian Popescu Jul 26 '11 at 21:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.