Gregius Data – Lifecycle

Overview

Gregius Data’s lifecycle subsystem governs plugin state across four phases — activation, active operation, deactivation, and uninstall. Tables and options are created on activation, data is preserved through deactivation, upgrades run automatically during active admin requests, and cleanup on uninstall is complete.

Prerequisites

  • Administrator access to the WordPress admin panel
  • Gregius Data plugin installed (standard WordPress plugin installation)

What Happens During Each Lifecycle Phase

Activation

When you activate Gregius Data, the plugin establishes its initial state:

  • Creates plugin-owned settings, sync metadata, and log tables.
  • Initializes default sync options with conservative defaults.
  • Schedules connection health checks and daily validation events.
  • Adds the manage_gg_pg capability to the administrator role.
  • Seeds the default prompt template.

Active admin requests

While the plugin is active, every admin page load triggers a version check. If the installed version is older than the current code version, upgrade routines run automatically to keep plugin state in sync.

Deactivation

Deactivation pauses plugin operation without removing your data:

  • Clears active plugin-owned scheduled events.
  • Sets a cleanup signal for browser-side localStorage.
  • Preserves all plugin options, tables, and user data — reactivation resumes from existing state.

Uninstall

Uninstall is the only destructive lifecycle phase. It permanently removes plugin-owned data:

  • Unschedules background jobs (Action Scheduler or WordPress cron fallback).
  • Deletes all plugin-owned options, transients, and custom tables.
  • In multisite, cleans per-site data and network-level metadata.
  • Flushes the object cache after cleanup.

Default Sync Settings

On activation, the plugin initializes sync settings with conservative defaults that require explicit configuration before sync features become active:

SettingDefaultPurpose
Enabled post typesEmptyNo post types synced until explicitly selected
Enabled statusesEmptyNo statuses synced until explicitly selected
Real-time syncDisabledRequires manual opt-in
Meta syncEnabledAvailable when core sync is configured
Term syncEnabledAvailable when core sync is configured

This design prevents accidental mass syncing immediately after activation. You must explicitly configure which content to sync through the plugin dashboard.


Permissions

ActionRequired capabilityNotes
Activate, deactivate, uninstall pluginactivate_pluginsStandard WordPress plugin management capability
Configure plugin settingsmanage_optionsRequired for all dashboard operations

Next Steps

View on GitHub: You can review, fork, and inspect the entire codebase and core logic over at the repository on GitHub.

Gregius Data is the open-source AI orchestration layer for WordPress.