How to add a GPX track to WordPress

You have a GPX file of a hike, a ride or a run and you want it on your WordPress site: a map with the route, the elevation profile and the numbers (distance, climbing, time). With the free WP GPX Maps plugin it takes about five minutes, and you need no account and no API key.

This is what you get at the end:

Map of the route “How to add a GPX track to WordPress”: 4,38 km, 145 m of climbing and 376 m of descent, elevation between 1.317 m and 1.580 m, time 01:13:54. It starts at 45.91689, 11.84247 and ends at 45.89153, 11.82184 (latitude, longitude).

Total distance: 4.38 km
Max elevation: 1580 m
Total climbing: 145 m
Total descent: 376 m
Total time: 01:13:54

1. Install the plugin

In your WordPress dashboard go to Plugins > Add New, search for WP GPX Maps, click Install Now and then Activate. The default settings already work: the maps come from OpenStreetMap and the units are kilometers and meters.

2. Upload the GPX file

Go to Media > Add New and upload the file, like an image. WP GPX Maps also accepts FIT files from Garmin and Wahoo devices, TCX and KML / KMZ, so you can use the file you already have. The plugin checks every file: if it is not a valid track, you get a clear message instead of a broken page.

Do not have the file yet? See how to export it from Strava, Garmin or Komoot.

3. Add the GPX Map block

  1. Open the post or page in the editor and click the + button.
  2. Search for GPX Map and add the block.
  3. Pick your file from the list (or click Media Library to upload it from here). The map appears in the editor right away.
  4. In the sidebar on the right choose what to show: the summary (distance, climbing, time), the speed or heart rate chart, the map type, the track color.
  5. Publish.

Using the classic editor, Elementor or another page builder? Use the shortcode instead of the block: [sgpx gpx="/wp-content/uploads/2026/11/my-track.gpx" summary=true]. The address is the one you see in the Media Library when you open the file. The shortcode options have the same names as the settings of the block, and the full list is in Settings > WP GPX Maps > Help.

4. Make it yours

  • Color the track by grade, speed or heart rate: climbs and descents are clear at a glance. See an example.
  • Several tracks on one map, one color each, for a multi-day trip. See an example.
  • 3D terrain and satellite with a free Mapbox key. How to get the key.
  • Distance markers every kilometer or mile, and soft edges so the map fades into the page. See an example.
  • Defaults for every map (units, colors, map type) in Settings > WP GPX Maps, so new maps already look the way you want.

Questions

Will a long track slow down my page? No. The map code is loaded only on pages with a map, and only when the map gets near the screen. The 769 km of the Camino Francés, a 2 MB file with almost 33,000 points, opens in a second or two.

Can visitors download the file? Only if you want: turn on the download link in the block settings.

Do I need an API key? No, OpenStreetMap, OpenTopoMap and CyclOSM work without one. A key is needed only for Mapbox (3D and satellite) and Thunderforest maps, and both have a free plan.

Does Google understand the map? Yes. Every map also writes a short text description of the route and structured data with distance and climbing, so search engines and AI assistants can read it. Read more.

Something does not work? Ask in the support forum with the address of the page and, if possible, the GPX file.

Commenti

Lascia un commento

Il tuo indirizzo email non sarà pubblicato. I campi obbligatori sono contrassegnati *