This repository contains scripts and utilities for creating one or many WordPress events using The Events Calendar Pro REST API.
- ✅ Create one event or many events from a single configuration file
- ✅ Supports both
event(single) andevents(multiple) config shapes - ✅ Unique event names for each event
- ✅ Customizable start/end dates and times
- ✅ Support for venues, organizers, and categories
- ✅ Dry-run mode for testing
- ✅ Verbose output for debugging
- Python 3.6 or higher
requestslibrary:pip install requests- WordPress site with The Events Calendar Pro plugin installed
- REST API enabled on WordPress
- Application password for authentication
-
Clone this repository:
git clone https://github.com/ESIPFed/Collaboration-Area-Event-Series.git cd Collaboration-Area-Event-Series -
Install dependencies:
pip install requests
Create a JSON configuration file with your WordPress credentials and event details.
See examples/events-config.json for a multi-event example.
{
"wordpress_url": "https://your-wordpress-site.com",
"username": "your-username",
"app_password": "xxxx xxxx xxxx xxxx xxxx xxxx",
"events": [
{
"title": "Event Name",
"description": "Event description",
"start_date": "2024-01-08",
"end_date": "2024-01-08",
"start_time": "14:00:00",
"end_time": "15:00:00",
"venue": "Virtual - Zoom",
"organizer": "Organization Name",
"categories": ["Category1", "Category2"]
}
]
}wordpress_url: Your WordPress site URLusername: WordPress usernameapp_password: Application password (see Setup Guide below)- Either
events: Array of event objects, orevent: single event object
Required:
title: Event title/name (string)start_date: Event start date in YYYY-MM-DD formatend_date: Event end date in YYYY-MM-DD formatstart_time: Event start time in HH:MM:SS formatend_time: Event end time in HH:MM:SS format
Optional:
description: Event description (string)venue: Venue name (string)organizer: Organizer name (string)categories: Array of category names
# Basic usage
python scripts/create_events.py --config examples/events-config.json
# Dry run (test without creating events)
python scripts/create_events.py --config examples/events-config.json --dry-run
# Verbose output
python scripts/create_events.py --config examples/events-config.json --verbose
# Display help
python scripts/create_events.py --helppython scripts/generate_wp_events_config.py \
--template examples/events-config.json \
--zoom-config zoom-meeting-2026-config.json \
--zoom-output-csv zoom_meetings_output.csv \
--output wp-events-2026-config.jsonThis generator:
- uses
examples/events-config.jsonas the framework, - maps meetings from Zoom config into WordPress
events, - strips trailing
- 2026from titles, - injects standardized registration HTML into each event description,
- and uses
registration_urlmatched bymeeting_topicfromzoom_meetings_output.csv.
The generated description includes:
.registration-notewith registration requirement text,.footer-notewith calendar/update guidance,.annual-reset-notewith annual re-registration guidance.
- Log in to your WordPress admin panel
- Go to Users → Profile
- Scroll down to Application Passwords
- Enter a name for the application (e.g., "Event Series Script")
- Click Add New Application Password
- Copy the generated password (it will look like:
xxxx xxxx xxxx xxxx xxxx xxxx) - Use this password in your configuration file
The REST API is enabled by default in WordPress. If you're having issues:
- Check that permalinks are enabled (Settings → Permalinks)
- Ensure The Events Calendar Pro plugin is installed and activated
- Test the API endpoint:
https://your-site.com/wp-json/tribe/events/v1/events
{
"wordpress_url": "https://example.com",
"username": "admin",
"app_password": "xxxx xxxx xxxx xxxx xxxx xxxx",
"event": {
"title": "Team Meeting",
"description": "Regular team sync meeting",
"start_date": "2024-01-08",
"end_date": "2024-01-08",
"start_time": "10:00:00",
"end_time": "11:00:00"
}
}See examples/events-config.json for a complete example with multiple events.
- Verify your username and application password are correct
- Ensure the application password includes spaces as shown
- Check that your user account has permission to create events
- Verify The Events Calendar Pro plugin is installed and activated
- Check that permalinks are enabled in WordPress
- Test the API endpoint in your browser:
https://your-site.com/wp-json/
- Run with verbose mode to see detailed error messages
- Check WordPress error logs
- Verify date/time formats are correct (YYYY-MM-DD and HH:MM:SS)
- The script includes a 0.5-second delay between requests
- If you have many events, the script may take time to complete
- Check your server's rate limiting settings
This script uses The Events Calendar Pro REST API. Key endpoints:
- Create Event:
POST /wp-json/tribe/events/v1/events - Get Events:
GET /wp-json/tribe/events/v1/events - Update Event:
PUT /wp-json/tribe/events/v1/events/{id} - Delete Event:
DELETE /wp-json/tribe/events/v1/events/{id}
For more information, see The Events Calendar REST API documentation.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.
For issues and questions:
- Open an issue on GitHub
- Check The Events Calendar Pro documentation
- Review WordPress REST API documentation
- Added
scripts/create_events.pyfor non-recurring event creation via REST API - Added support for single
eventand multieventsconfig formats - Updated documentation and examples