Publishing Fundamentals

FTP publishing patterns, template variables, scheduling strategies, and caching β€” the practical foundation for getting station data onto the web.

SectionPublishingDepthFundamentalsCoversFTP Β· Templates Β· Cron Β· Caching
Quick Answers
  • Active vs passive FTP β€” which mode and when to switch
  • Directory structures that avoid overwrite conflicts
  • Template variable syntax for temperature, pressure, wind, rain
  • Scheduling uploads with cron, Windows Task Scheduler, or built-in timers
  • Cache busting techniques for images and graphs that update frequently

FTP Publishing Patterns

FTP remains the most common method for pushing weather station pages to a web server. Despite its age, it works reliably when configured correctly. The two modes you need to understand are active and passive.

In active mode, the server opens a data connection back to the client. This works on local networks but fails through most NAT firewalls and home routers. Passive mode reverses the connection direction: the client opens both the control and data channels outward, which passes cleanly through firewalls.

If your FTP uploads fail intermittently β€” connecting but then timing out during file transfer β€” the first thing to check is whether you are using passive mode. Almost every residential internet connection requires it.

Directory Structure Best Practices

Organise your remote FTP directory so that HTML pages, images, and data files occupy separate subdirectories. A typical structure looks like this:

/public_html/weather/
  index.html          ← main page (template output)
  /images/
    temp_24h.png      ← 24-hour temperature graph
    wind_24h.png      ← 24-hour wind graph
    pressure_48h.png  ← 48-hour pressure graph
  /data/
    current.xml       ← latest readings
    daily.csv         ← daily summary

This separation matters because graph images are regenerated on a different schedule than the HTML page. If everything sits in one directory, you risk a half-uploaded state where the page references a graph that is still being written.

If your station page shares a hosting environment with WordPress, directory placement and caching behaviour introduce a few extra considerations. The WordPress station publishing guide covers those specifics, including how to prevent WordPress caching plugins from serving stale weather data and how to exclude the station subdirectory from WordPress rewrite rules.

Templating and Variables

GraphWeather templates use variable placeholders that get replaced with live data at publish time. The syntax wraps variable names in delimiters β€” typically <%variable_name%> or {{variable}} depending on the application version.

Common variables include:

Templates can include conditional blocks, loops over historical data arrays, and format specifiers for decimal places and unit suffixes. See the WeatherLink and Templates guide for detailed syntax reference.

Scheduling Strategies

How often you publish depends on your use case and server resources. Most hobbyist stations publish every 5 to 15 minutes, which is frequent enough for casual viewers and light enough to avoid FTP connection limits.

Three common scheduling approaches:

  1. Built-in timer β€” GraphWeather desktop has an internal scheduler. Set the interval in the publishing configuration and let the application manage the cycle. This is the simplest approach and handles retry logic automatically.
  2. Cron (Linux/macOS) β€” For server-side PHP publishing, a cron job triggers the data processing and upload script. A typical entry: */5 * * * * /usr/bin/php /home/user/weather/publish.php
  3. Windows Task Scheduler β€” Similar to cron, for Windows-based setups where the desktop app is not running continuously.

Caching and Cache Busting

Weather graphs change every few minutes, but browsers and CDNs aggressively cache images. If your graphs appear stale to visitors, the problem is almost always caching rather than a publishing failure.

The most reliable cache-busting technique is appending a query parameter to image URLs that changes with each publish cycle:

<img src="/images/temp_24h.png?v=<%publish_timestamp%>" width="800" height="400" alt="24-hour temperature graph">

The Image Refresh and Caching guide covers this topic in depth, including CDN-specific strategies and HTTP cache-control headers.

Latest Publishing Guides

Weather Data Standards: METAR, CWOP and WMO Explained
18 April 2026

Decode the weather data standards that matter for station operators β€” METAR format, CWOP packet structure, and WMO observation guidelines in plain language.

Understanding Ensemble Forecasting and NOAA's New AI Models
15 April 2026

How ensemble forecasting works, what NOAA's emerging AI weather models mean for local observers, and how your station data fits into the bigger forecasting picture.

Maximise Reach: Publishing to Weather Networks Beyond WUnderground
12 April 2026

Expand your station's reach beyond Weather Underground β€” covering APRS/CWOP, national networks, citizen science projects, and emerging open-data platforms.

Sharing Your Data: WUnderground, PWSweather, WeatherCloud & CWOP
10 April 2026

How to register and publish your weather station data to Weather Underground, PWSweather, WeatherCloud, and CWOP β€” with configuration examples and data format requirements.

Troubleshooting Common Upload & FTP Issues
6 April 2026

A systematic troubleshooting guide for weather station upload failures β€” covering FTP timeouts, permission errors, passive mode problems, and stale data symptoms.

Securing Your Weather Station Data: Encryption & Access
4 April 2026

Practical security guide for weather station operators β€” covering SFTP over FTP, API key management, access control for station dashboards, and network segmentation.

Integrating Your Weather Station with MQTT and Home Assistant
1 April 2026

Connect your weather station to Home Assistant via MQTT for real-time indoor dashboards, automations triggered by weather conditions, and long-term data logging.