Data Sync from Google Sheets

The plugin provides powerful tools to synchronise your website's route data directly from a master Google Sheet. This is the most efficient way to manage large amounts of data.

This tool is found under Routes → Route Management, in the Route Sync tab.

Route Sync from Google Sheet

This tool allows you to create, update, and delete routes on your website to perfectly match the contents of a Google Sheet.

Core Concept: The Unique ID

The sync process uses the `unique_id` column in your sheet as the primary key. This is the critical link between a row in your spreadsheet and a route post in WordPress. For each row in the sheet, the system looks for a route on your website with a matching `unique_id`.

Required Sheet Format

Your Google Sheet must be publicly accessible via its CSV export URL and contain columns with the following exact names:

Column NameDescription
unique_idThe unique identifier for the route. Must be a number.
route_nameThe title of the route.
ride_descriptionA short description, often a list of towns.
long_descriptionThe main, detailed description for the route.
km / milesDistance of the route.
elevation_m_ / elevation_ft_Total ascent of the route.
gpx_urlA direct, public URL to the route's GPX file.
strava_urlAn optional link to a Strava activity.
ownerThe name of the route creator.
g1, g2, g2_5, g3, g4, g5Legacy grade columns. Enter 'y' or '+' to assign a grade.

Using the Sync Tool

  1. Navigate to Routes → Route Management → Route Sync.
  2. Choose Sync Mode:
    • Full Sync: Creates, updates, and deletes. The recommended mode for keeping the website perfectly in sync.
    • Add/Update Only: Use this if you only want to add new routes and update existing ones without deleting any.
    • Preview Only: A safe dry-run that shows a report of all changes that would be made, without actually touching your data. Always use this first if you are unsure.
  3. GPX File Handling: Check the "Download and attach GPX files" box to have the system automatically fetch the GPX file from the `gpx_url` in your sheet and attach it to the route post in WordPress. This is a very powerful time-saver.
  4. Run Sync: Click the "Run Sync Process" button. A detailed report will be shown upon completion.