in WordPress

Export wordpress mu db from localhost to live

My maximum blogs are related to my problems that I face while working with diff projects. Yesterday I was working with wordpress mu. Hope you may know that wp mu can be installed in two diff ways.

  • blog.yourdomain.com
  • yourdomain.com/blog.

As I was using localhost I used yourdomain.com/blog though subdomain can be configured in localhost. 🙂

One thing I don’t like about wordpress is it saved siteurl and domain path name in db. I worked with joomla and phpbb. They use relative url. No need to think about the site url.

Opps… I didn’t mention about the main topic of this post. Suppose you are working with wordpress in localhost and you want to  export/transfer it to any live domain. For this you can do it in two ways:

Export wp settings/db/datas(whatever you say) from wp admin panel and then install wordpress in live and again import the settings/db/datas(whatever you say) from wp admin(live)….it’s too much.

Another way is to upload the whole files and export db from localhost(you can use phpmyadmin or any how) and import db in live. Change the configuration as necessary. Change htaces file(Ususally if use set same domain setting in local and live u don’t need to do any change :D)

The problem is, I like the second way and it’s more easier to show consecutive work progress but every time you migrate db from localhost to live you have to change site url from db manually :(.

For wp mu you have to check 3 tables wp_site, wp_blogs, wp_*_options.