control-incremental.sh

Performs incremental updates of itineraries for a WordPress site, handling both WPML and non-WPML setups.

Usage

./control-incremental.sh

Description

  • Checks if the script is already running and exits if it is.
  • Logs the start time.
  • If WPML is enabled:
  • Retrieves languages from the database and processes each language.
  • Truncates and updates the ca_itinerary_lookup table.
  • Updates itinerary status and post IDs.
  • Updates itineraries for posts in batches, running updates in the background.
  • If WPML is not enabled:
  • Truncates and updates the ca_itinerary_lookup table.
  • Updates itinerary status and post IDs.
  • Updates itineraries for posts in batches, running updates in the background.

Dependencies

  • functions.sh: Utility functions.
  • mysql: MySQL commands.
  • jq: JSON parsing.

Notes

  • Ensure all required environment variables and plugins are set before running.
  • Intended for use by developers or system administrators familiar with WordPress and server scripting.

For further details, refer to the comments in the script or contact the development team.