WordPress: from localhost to production

Jul 3, 2013   #php  #production  #wordpress 

Yesterday, a friend of mine asked me urgent help. He fully developed a WP based website for a research project on localhost/his_website. As WP stores full links pretty much everywhere in the database, his website was obviously completely broken when he moved it to production on his_website.com.

I quickly put some PHP lines of codes together to fix the whole DB at once. Feel free to re-use it in your own projects.

usage:

DISCLAIMER: this script comes with NO WARRANTY. USE IT AT YOUR OWN RISKS.