The OSM – OpenStreetMap plugin is a good general map plugin: markers, many map styles, KML and GPX files. If your posts are mostly about routes and you want an elevation profile, a route summary (distance, climbing, time) and the chart linked to the map, WP GPX Maps does that out of the box. This guide moves your GPX maps one post at a time, without breaking anything.
Before you start
- Make a backup of the site (most hosts have a button for it).
- Install and activate WP GPX Maps from Plugins > Add New. The two plugins can stay active together while you move the posts: they use different shortcodes.
- Your GPX files stay where they are: WP GPX Maps reads them from the same folder in
wp-content/uploads.
1. Find the posts with an OSM map
In Posts > All Posts search for osm_map: the list shows every post with a map of the OSM plugin (do the same in Pages). Only the maps with a file_list (or gpx_file in older posts) show a track: the others are maps with markers, and you can leave them as they are.
2. Replace the shortcode
A typical OSM map with a track looks like this:
[osm_map_v3 map_center="45.87,11.80" zoom="13" width="100%" height="450" file_list="../../../../wp-content/uploads/2026/05/my-hike.gpx" file_color_list="#0000ff"]
The same map with WP GPX Maps:
[sgpx gpx="/wp-content/uploads/2026/05/my-hike.gpx" mheight="450px" mlinecolor="#0000ff" summary=true]
Or, in the block editor, delete the shortcode and add a GPX Map block, then pick the same file from the list.
| OSM plugin | WP GPX Maps |
|---|---|
file_list, gpx_file | gpx: the address from /wp-content/ on, without the ../../../../ at the start. Several files separated by commas work too, each with its own color. |
file_color_list | mlinecolor (for one file) |
height, width | mheight, width, with the unit: 450px, 100% |
map_center, zoom | Not needed: the map zooms on the track by itself |
type (map style) | mtype, or the default in Settings > WP GPX Maps |
| (none) | summary=true for distance, climbing and time; the elevation chart is on by default |
Set the defaults once in Settings > WP GPX Maps (units, map type, colors, which numbers to show in the summary): then a short [sgpx gpx="..."] is enough in every post.
3. Check and clean up
Open each post you changed and check the map. When no post uses osm_map any more, you can deactivate the OSM plugin; keep it if you still use its maps with markers.
This is what a moved post looks like:
Map of the route “Switching from the OSM plugin to WP GPX Maps”: 6,49 km, 1.236 m of climbing and 88 m of descent, elevation between 606 m and 1.753 m, time 01:53:52. It starts at 45.86700, 11.83435 and ends at 45.87277, 11.80264 (latitude, longitude).
Max elevation: 1754 m
Total climbing: 1236 m
New to WP GPX Maps? Start from How to add a GPX track to WordPress. Stuck with a map? Ask in the support forum with the old shortcode and the address of the page.
Lascia un commento