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!Social tagging: geopress > geotag > migration > wordpress