Skip to content
WP Cloud
WP Cloud
    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management
    • PanelAlpha Integration: White-Label WordPress Control Panel for Hosts
    • EasyEngine Panel Integration: Visual WordPress Management for WP Cloud
    • FAQs
    • WP Cloud API
    • Partner Portal
    • Documentation
    • New Partner Guide
    • Pressable
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Impressive Hosting
    • Blog
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗
  • Solutions

    • For Hosts
    • For Agencies
    • For Registrars
    • For Native Hosting
    • Featured Partners

    Features

    • Performance
    • Security
    • Real-Time Automated Failover
    • Vertical Scaling and Bursting
    • WordPress Management

    Integrations

    • PanelAlpha Integration
    • Easy Engine Panel Integration

    Resources

    • Documentation
    • WP Cloud API
    • FAQs
    • Partner Portal
    • New Partner Guide
    • Announcements
    • Changelog
  • Case Studies
    • PressableA case study about how WP Cloud supports Pressable to power millions of page views daily.
    • Convesio
    • Porkbun
    • PanelAlpha
    • Ivapix
    • UNC Greensboro
    • Newspack
    • Inverse Paradox
  • Insights
    • Podcast
    • BlogWP Cloud blog page with latest news and updates about the platform.
    • Performance Benchmarks
  • Connect With Us
  • Login ↗
Start Here ↗

Browse

    • WP Cloud platform overview
    • Onboard and launch with WP Cloud
    • WP Cloud Partner Portal
    • Get support from WP Cloud
    • WP Cloud glossary
    • API Documentation
    • Manage and secure API keys
    • Client SSH
    • WP Cloud API quick start
    • Webhooks
    • Run bulk tasks across sites
      • Manage site domains and aliases
      • Domain verification records
      • TLS certificates
      • Manage custom TLS certificates
      • Cloudflare and WP Cloud
    • Clone a site
    • Configure resources, site type, and billing with site meta
    • Delete a site
    • Persistent data
    • Staging sites
    • Migrate a site to WP Cloud
      • SSH and SFTP access models
      • Client SSH
      • User SSH and SFTP access
      • Database credentials
      • phpMyAdmin
      • ABSPATH
      • Default wp-config.php
      • Site constants
      • Configure redirects and headers with custom-redirects.php
      • Akismet and Jetpack
      • Blocked and unsupported plugins
      • PHP lifecycle and supported versions
      • Symlinks and managed software
      • WordPress versions
      • Install Composer and WP-CLI packages
      • Manage platform software with WP-CLI
      • Useful WP-CLI commands
    • Transactional email
    • WordPress multisite
    • Cron scheduling
    • Decoupled and headless WordPress
      • Edge Cache preload
      • WooCommerce cart caching
      • Page Cache
      • Edge Cache
      • Object Cache
      • Image transformation
      • Offload image sub-sizes
    • Configure lightweight 404s for static files
      • Edge Rules overview
      • Edge Rule types
      • Edge Rule conditions
      • Verify Edge Rules
      • Edge Cache preload
      • WooCommerce cart caching
      • Edge Cache
    • Edge request logs
      • DDoS protection
      • Defensive Mode
      • Rate limiting
      • Network and web application firewalls
      • Bot protection
      • Password protection
      • HTTP and security headers
      • PHP filesystem access permissions
      • Scan a site for malware
    • Backups overview
    • Create an on-demand backup
    • Restore a backup
    • Jetpack backups
      • Error logs
      • Web server logs
      • Edge request logs
    • Usage reporting
    • Metrics
    • Application performance monitoring
    • Automated failover
    • IP ranges
    • Origin and edge servers
    • Server specifications and settings
    • EasyEngine integration
    • PanelAlpha integration
      • White labelling and co-marketing WP Cloud
      • WP Cloud logos
      • Terms of Service & Compliance
      • Prohibited content
      • Copyright infringement and takedown notifications
    • WP Cloud billing
    • WP Cloud for agencies and site networks
    • WP Cloud partner support options
    • Troubleshoot Page and Edge Cache
    • Troubleshoot HTTP 429 and 599 errors
    • WP Cloud HTTP status codes
    • Troubleshoot site performance
    • Cache slow database queries
    • Troubleshoot duplicate core files, wp-config.php, and wp-admin 403 errors
    • Troubleshoot email delivery
    • Repair Yoast indexables
    • Troubleshoot PDF thumbnail generation
    • Troubleshoot TLS certificate provisioning

Updates

  • Changelog
  • WP Cloud Status
  • Announcements
Documentation/Sites/Persistent data

Persistent data

LAST UPDATED

5 months ago

    Persistent Data stores site-specific values that a partner controls through the WP Cloud API and site code can read through Atomic_Persistent_Data. A partner can set Persistent Data during site creation or after the site has been provisioned, using a different endpoint for each operation. A partner’s customer cannot change these values from WordPress.

    Persistent Data remains in place until the partner updates or removes it through the API, and it is preserved when that site is reset. A clone is a new site and does not inherit the source site’s Persistent Data. It is separate from the _data site-meta field used for site type, billing classification, and partner inventory metadata.

    Choose appropriate values

    Partners can use Persistent Data for any site-wide value their integration needs, including:

    • a hosting plan identifier;
    • a partner’s site or account ID;
    • a feature flag used by a partner plugin; or
    • a time-limited entitlement such as PLAN_EXPIRATION.

    Persistent Data is appropriate for site-wide values that control critical behavior. A hosting plan is one example: a partner plugin can use the plan value to gate features, and a missing or stale value can deny features the customer paid for.

    Do not use Persistent Data as primary storage or as the source of truth. Maintain the authoritative value in your own system and push it to Persistent Data when it changes.

    Do not use Persistent Data for per-user values such as a WordPress administrator’s color scheme. That would require WP Cloud to store a separate value for every applicable user on the site. Store user-specific data in the site’s application database instead.

    Set data during site creation

    If a value must exist when a new site first starts, supply it through the Create Site endpoint using persist_data:

    --data-urlencode 'persist_data[HOST_PLAN]=business'Code language: JavaScript (javascript)

    This also works when the Create Site request includes clone_from. The new site receives the persist_data values supplied in that request; no separate follow-up call is needed to apply them. If you omit persist_data, the new site’s Persistent Data is null, even when the source has existing values.

    For a complete site-creation request, use the WP Cloud API quick start. For a fresh site, wait for the matching site_provisioned webhook before starting site-scoped setup. For clones, follow the returned response_ticket_id in summary mode until its status is success. Do not use the provisioning job_id as the clone-completion check or call a site-scoped Persistent Data operation while the clone is queued or running. See Monitor clone completion for the status values and troubleshooting steps.

    Set or remove data after a site is provisioned

    Use the Persistent Data endpoint after the site exists. This request sets HOST_PLAN and removes PLAN_EXPIRATION in one operation:

    curl --fail-with-body --silent --show-error \
      --request POST \
      --header "Auth: ${WP_CLOUD_API_KEY}" \
      --header 'Content-Type: application/x-www-form-urlencoded' \
      --data-urlencode 'data[HOST_PLAN][value]=business' \
      --data-urlencode 'data[PLAN_EXPIRATION][delete]=1' \
      "https://atomic-api.wordpress.com/api/v1.0/site-persist-data/${WP_CLOUD_SITE_ID}"Code language: JavaScript (javascript)

    A successful response returns the current data and a response ticket ID. Poll the Get Response Ticket Summary endpoint until the ticket reaches a terminal state. Use the Get Response Ticket Details endpoint when you need messages for troubleshooting. Summary mode is lighter and faster for routine polling. The returned job_id field is deprecated and is not a reliable success signal.

    If the endpoint returns HTTP 429, wait for the number of seconds in the Retry-After header before trying again. That response means WP Cloud could not acquire the site’s data lock.

    Read data in WordPress

    WP Cloud encrypts Persistent Data before storing it in the platform database. The site receives an encrypted file at /tmp/.at-persistent-data. Read values through the platform class, normally from a partner plugin or mu-plugin:

    $persistent_data = new Atomic_Persistent_Data();
    $host_plan = $persistent_data->HOST_PLAN;Code language: PHP (php)

    Check that your code handles a missing or expired value safely. A missing plan value should not silently grant a paid feature.

    After the response ticket completes, read the value through Atomic_Persistent_Data on a non-production site or exercise the partner feature that consumes it. This checks the value that site code receives, rather than only the value accepted by the API.

    Previous Delete a site
    Next Staging sites

    Related Guides

    • Clone a site

      Clone a WP Cloud site from an existing site ID or domain, and understand how…

      4 Min.

      READ

    • Manage site domains and aliases

      Manage primary and secondary WP Cloud site domains, control alias canonicalization, retrieve suggested DNS addresses,…

      4 Min.

      READ

    • Configure resources, site type, and billing with site meta

      Configure PHP resources, storage, site type, and billing classification with WP Cloud site meta.

      6 Min.

      READ

    On this page

      Contact support

      Contact us with Support issues and questions related to WP Cloud, the WP Cloud Atomic API, API-key IP allow list changes, Station, and more.

      Check the FAQs

      Have questions? Please visit our FAQ to learn more.

      An Automattic venture

      Work With Us

      Press

      Privacy Policy

      © 2021-2026 Automattic Inc.

      Notifications