Just in case you decided to try other location tagging plug-in for your WordPress today.
I have developed a fairly simple data migration script so that you won’t need to go through the pain of re-adding latitude and longitude for the new plug-in in all your posts.
Essentially, you will need a bit knowledge on how to access your database administration. Typically, you will be using phpmyadmin to manage your WordPress database.
Here is how we do it.
- Go to your phpmyadmin
- Select your WordPress’s database, by default, it has a suffix/prefix of ‘WP’
- Click on the SQL tab
- Then, execute the following queries below.
Run this for its latitude…
insert into wp_postmeta (post_id,meta_key,meta_value) (select p.post_id, ‘_geotag_lat’, format(left(g.coord,instr(g.coord,’ ‘)-1), 5) lat from wp_postmeta p join wp_geopress g on p.meta_value = g.geopress_id where p.meta_key = ‘_geopress_id’);
And, run this query to retrieve the longitude…
insert into wp_postmeta (post_id,meta_key,meta_value) (select p.post_id, ‘_geotag_lon’ , format(right(g.coord,length(g.coord) – instr(g.coord,’ ‘)),5) lon from wp_postmeta p join wp_geopress g on p.meta_value = g.geopress_id where p.meta_key = ‘_geopress_id’);
I have migrated mine successfully. Hope it helps for you too!
Popularity: 6% [?]
Related posts:
- Blogspot to self-hosted WordPress migration
- Theme Switcher
- Pinpoint your photo location with GeoPress
- Oracle SQL – Return value regardless of record existance
- WordPress stats missing
Related posts brought to you by Yet Another Related Posts Plugin.


soo sean
October 12, 2009 at 10:40 am
OMG! You are an expert! I know where to look for help in future. Kekeke.
Reply
Hugo Lim Reply:
October 12th, 2009 at 11:13 pm
hahahhaa.. surely surely… will gimme a note when you need help on these fields :P
Reply
DavidT
October 22, 2009 at 1:54 pm
wahh… dont really get this… any tutorial on how to setup the hosted wordpress blog?
Reply
Hugo Lim Reply:
October 23rd, 2009 at 11:07 am
setting up ahh, tutorials about this is wide spread across the giant webby…. try google around!
in case you are moving from blogspot to wordpress, then you can see my article on it lah!
http://www.hugolim.com/2008/09/blogspot-to-self-hosted-wordpress-migration
thanks for commenting ahh!
Reply