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.

Done this before and i am still wondering what to do with the wp_posts => guid content, which has reference to http://localhost

But at wordpress.org http://codex.wordpress.org/Changing_The_Site_URL it clearly states:

Never, ever, change the contents of the GUID column, under any circumstances.

But as i understand it is just to unique identify your posts globally. But as more people would have http://localhost in their guid.

So can i safely replace http://localhost with http://www.mydomain.com??

regards

share|improve this question
add comment

1 Answer 1

up vote 4 down vote accepted

"GUID" stands for "Globally Unique Identifier" mainly used by feeds to tell if that specific post was shown on the feed before or not, even if you change domains.

When developing on local host and the moving to live (+1 just for that BTW) and no feed reader/burner has read your feeds and only if that is the case it's OK to change it and start fresh on your new live host.

share|improve this answer
    
tx, still not able to move from local to live in 5 min, ;) For others i used UPDATE wp_posts SET guid = REPLACE (guid, 'http://localhost', 'http://www.mydomain.com'); –  alex Mar 4 '12 at 17:53
2  
Using sed on a dump to replace hosts will ensure that all your menus, options, etc. are ready for production as well. –  soulseekah Mar 4 '12 at 17:56
2  
Yes, I also normally dump the DB, then globally replace in the dump before restoring it. I also just noticed that under the Codex advice on moving multi-site installs, there's now a link to a specialised search and replace tool that copes with safely replacing in PHP serialised DB data, specifically for doing things like this. –  Matt Gibson Mar 4 '12 at 21:05
    
@Soulseekah btw what is sed ?? –  alex Mar 13 '12 at 4:57
    
@alex en.wikipedia.org/wiki/Sed –  soulseekah Mar 13 '12 at 8:26
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.