Many sites still run WP GPX Maps 1.7, often because an update in 2020-2022 broke something and automatic updates were turned off. Version 1.10 fixes those problems, works on PHP 8 and closes security issues of the old versions: here is how to update safely, in about ten minutes.
Why update
- Security: 1.7.x has known vulnerabilities (broken access control, reflected XSS), fixed in 1.8.
- PHP 8: no more fatal errors with tracks without time or elevation, with waypoints or with remote files. Tested on PHP 7.4 to 8.4.
- Faster pages: the map code loads only on the pages with a map, and only when the map gets near the screen.
- New features: the GPX Map block, FIT/TCX/KML files, tracks colored by grade or speed, several tracks on one map, activities.
How to update
- Make a backup of the site (files and database), as for any update.
- Do not deactivate the plugin first: in 1.7, deactivating WP GPX Maps also resets its settings (fixed in 1.10.03). Your GPX files in
wp-content/uploads/gpxare never deleted. - Update from Dashboard > Updates or from the Plugins page. If you had patched the plugin files or blocked its updates, download the zip from wordpress.org, go to Plugins > Add New > Upload Plugin and choose Replace current with uploaded.
- Open Settings > WP GPX Maps > Tracks and click Clear Cache, so every track is read again with the new code.
- Open two or three pages with a map and check them. Your
[sgpx]shortcodes keep working: you don’t need to change your posts.
If something looks wrong
- “Access blocked” tiles from OpenStreetMap: OpenStreetMap needs a Referer. Check that your site, security plugin or CDN does not send
Referrer-Policy: no-referrer. - Old map still shown: empty the cache of your caching plugin or CDN.
- Shortcode options passed in the page URL no longer work: this was the security hole of 1.7. Put the options in the shortcode or in the block.
- Do I need a Mapbox account? No. The free OpenStreetMap maps work as before; a Mapbox key is only needed for the Mapbox 3D and satellite maps.
Still stuck? Open a thread on the support forum with the URL of the page, the shortcode or block you use and, if possible, the GPX file: I answer there.
Want to see what 1.10 can do? Watch the 3-minute video or open the Camino Francés: 769 km and 33,000 points on one map.
Lascia un commento