Skip to main content

ClassicPress on Google Cloud Run

ClassicPress on Google Cloud Run

ClassicPress is a free, open-source, business-focused CMS — a lightweight fork of WordPress 4.9.x that preserves the classic (pre-Gutenberg) editing experience, with plugins, themes, a media library, and a REST API. This module deploys ClassicPress on Cloud Run v2 on top of the App_CloudRun foundation, which provisions and manages the shared Google Cloud infrastructure.

This guide focuses on the cloud services ClassicPress uses and how to explore and operate them from the Google Cloud Console and the command line. For the mechanics common to every Cloud Run application — service identity, ingress and load balancing, scaling and concurrency, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC Service Controls, backups, and the deployment lifecycle — refer to the App_CloudRun foundation guide rather than repeating them here.


What ClassicPress costs on RAD, and how that compares​

ClassicPress on RAD's Cloud Run module costs about US$83.61 a month in a Google Cloud project you own, plus a one-time 75-credit module fee (US$7.50). ClassicPress is a lightweight, pre-Gutenberg fork of WordPress for business sites. GKE Autopilot suits ClassicPress that must stay up, scale across pods, or run beside other Kubernetes workloads; for the lowest cost, this Cloud Run module is usually the right pick — see the GKE guide if you need the other.

If ClassicPress is only needed occasionally — a demo, a trial, a seasonal or study workload — a RAD-managed project can be deleted and restored within 30 days for a handful of credits, so that US$83.61 becomes a few dollars a month instead. See Pause it for free, below.

What you pay on RAD​

In a Google Cloud project you ownIn a project RAD manages for you
Module fee, once per deployment75 credits (US$7.50 at the top-up price)67.5 credits (10% lower)
Build timeA few credits per build (roughly 3–6)The same
Google Cloud running costBilled by Google to your own billing account, about US$83.61 a month for the default configuration (table below)Metered hourly in credits; RAD publishes 32 credits a day, about 960 a month (about US$96 at the top-up price)
Who owns whatYou own the project and its billing; RAD deploys and updates itRAD owns the project, with guardrails, quotas and budget alerts; you get console access, and a minimum purchased balance is held in reserve

10 credits cost US$1 on a one-off top-up, less on a plan. In a project RAD manages, the database, file server and network are shared by every application in the project, so a second application does not add a second database.

Default running cost in your own project (us-central1, Google list prices):

Resource (module default)Per month
Cloud Run, 1x vCPU / 2 GiB (scaleToZero)US$13.16
Cloud SQL for MySQL, 1 vCPU / 3.75 GB, zonal, 10 GB SSDUS$51
NFS/cache file server (small VM)US$13.43
Cloud NAT and networkingUS$5
Cloud Storage (add-ons, backups)US$1
Totalabout US$83.61

How it compares​

  • Run it yourself and a VPS running PHP, MySQL and ClassicPress yourself costs less in cash: a Hetzner CPX22 or DigitalOcean 2 vCPU/4 GB box is about $24 a month, or a GCP e2-standard-2 about $49 a month — plus your own time for backups, security patches and upgrades, which RAD's managed Cloud SQL, Secret Manager and monitoring cover for you.
  • RAD never claims to be cheaper than bare infrastructure in cash terms — it usually is not. The difference is what RAD manages for you: patching, backups, secrets and monitoring, plus the ability to pause ClassicPress for free rather than paying for idle capacity (see below).
  • Most of the running cost above is the managed MySQL database (and, where used, the shared file server) — the part a bare VPS comparison has to run and back up by hand.

Pause it for free: delete a RAD-managed project, restore it when you need it​

If ClassicPress runs in a project RAD manages for you, you have a second option that goes well beyond scaling to zero: delete the whole project, and restore it within 30 days for close to nothing. This suits ClassicPress that you only need occasionally far better than running it continuously.

  • How it works. Deleting a RAD-managed project unlinks its billing first, then asks Google to delete the project. Google does not remove the project immediately: it keeps it, recoverable, for 30 days. Because billing is already unlinked, nothing is charged while it waits. Unlike deleting one module, this does not tear down Cloud SQL, the VM or Cloud Run resources one by one — the whole project, and everything in it, simply stops.
  • Restoring costs a handful of credits, not a rebuild. Within 30 days, the project's owner can restore it. RAD asks Google to undelete the project and reattaches its billing account, then asks you to run Update on each deployment to confirm everything came back. Because nothing was individually destroyed, that Update finds the same resources already there — it is a check, not a rebuild, and an Update never charges the module fee again. That is a handful of credits (under US$1) in total for a typical ClassicPress chain, against the 80 credits a full redeploy costs.
  • So a month of occasional use can cost a few dollars, not US$83.61. Deploy ClassicPress, use it, delete the project. Restore it next time you want it, confirm with Update, and delete it again when you're done. You pay only for the module fee once, the builds, and whatever hours it was actually live.
  • What this needs. You must own the project (not a bring-your-own one RAD only manages billing for), and you restore it yourself within the 30 days — after that, Google deletes it for good. Restoring is admitted like creating a new project: your purchased credit balance must still clear the tier's floor (100 credits for the sandbox tier most study and demo use fits). Google says most services are fully working again within 36 hours of a restore.
  • One real gap: the backup bucket does not survive. Nightly backups are written to a bucket inside the project, and that bucket is not protected by Cloud Storage's soft-delete, so it is very likely gone as soon as you delete the project — even though the project itself is recoverable for 30 days. If you have customised ClassicPress and want to keep that work, copy a backup out (to Google Drive, or a bucket outside the project) before you delete. For a default installation with nothing irreplaceable in it, this does not matter.

Pay only while you use it, the other way: delete and redeploy​

Cloud Run already scales to zero between requests. The option above only applies to a RAD-managed project; in your own project, or once the 30-day window has passed, the way to stop paying is to delete the deployment and deploy it again when you need it.

  • What a redeploy costs. The module fee again plus the builds: about 80 credits (US$8) in your own project. Deleting saves money only once ClassicPress would otherwise sit unused for about 3 days or more, whether in your own project or a RAD-managed one.
  • Most of the running cost is usually the database and the shared file or cache server. They stop only when nothing else in the project uses them, so deleting ClassicPress while something else shares the project saves only this app's own compute part.
  • Keep your data first. Nightly backups are written to a bucket inside the deployment and are deleted with it, so copy the latest backup out before deleting if you want to keep it.
  • Note your settings. RAD does not recreate a deleted deployment for you; you enter the settings again when you deploy.

Lab sessions and Managed Environments​

  • Lab sessions, for training. A trainer runs a session for a class. Each participant gets the app in their own Google Cloud project for 15 minutes to 24 hours, within an allowance the trainer sets. Either the trainer funds every place, or each participant pays for their own. Everything is deleted when the session ends and unused credits go back to the trainer.
  • Managed Environments, for consultancies. A partner runs the app for a client from a ring-fenced wallet it funds, and settles with the client directly. If the wallet runs low, billing pauses and the data is kept, so nobody receives an unexpected charge. At the end the partner hands the project over and the deployments become the client's own.

Credits can be bought in more than 20 currencies, including XAF, XOF, NGN, GHS, KES and ZAR, by card, bank transfer or mobile money.

Sources (8 October 2026): Google Cloud list prices from the Cloud Billing Catalog API; RAD's own fees and daily-credit estimates from radmodules.dev/pricing; Delete and restore projects for the 30-day recovery window and what it says about Cloud Storage objects without soft delete. Prices change; check each source before relying on a figure.

1. Overview​

ClassicPress runs as a single PHP/Apache container built from a thin custom image FROM classicpress/classicpress. The deployment wires together a focused set of Google Cloud services:

CapabilityGoogle Cloud serviceNotes
ComputeCloud Run v2PHP/Apache service on port 80, 1 vCPU / 2 GiB by default; scale-to-zero (min_instance_count = 0) is the default
DatabaseCloud SQL for MySQL 8.0Fixed — ClassicPress_Common hardcodes database_type = "MYSQL_8_0"
File persistenceCloud Filestore (NFS), optionalMounted at /var/www/html/wp-content by default (enable_nfs = true) — see Section 3 for how this achieves upload/plugin/theme persistence
Object storageCloud StorageBoth a data bucket (from the variant's own storage_buckets default) and a classicpress-uploads bucket (from ClassicPress_Common) are provisioned automatically; neither is mounted into the container by default
SecretsSecret ManagerAuto-generated CLASSICPRESS_SALT_SEED (derives the 8 WordPress-style auth keys/salts); database password
IngressCloud Run URL / Cloud Load BalancingDefault run.app URL; optional external HTTPS load balancer + custom domain

Sensible defaults worth knowing up front:

  • MySQL 8.0 is mandatory and hardcoded. ClassicPress_Common's config sets database_type = "MYSQL_8_0" directly; the variant's own database_type variable is largely decorative — overriding it breaks the MySQL-specific db-init job and entrypoint. Leave it at the default.
  • Custom build, not prebuilt. container_image_source defaults to "custom" — Cloud Build produces a thin image FROM classicpress/classicpress that grafts an entrypoint shim aliasing the Foundation's injected DB_* vars onto ClassicPress's CLASSICPRESS_DB_* and deriving stable auth salts. The stock upstream image is never deployed directly.
  • Cloud SQL is reached over private-IP TCP by default, not a Unix socket. enable_cloudsql_volume defaults to false (the variant explicitly forces this value into the app config, overriding whatever ClassicPress_Common might otherwise set); the entrypoint builds CLASSICPRESS_DB_HOST from DB_IP:DB_PORT. MySQL on the Cloud SQL private range needs no SSL. Set enable_cloudsql_volume = true to use the Auth Proxy socket instead.
  • The ClassicPress core install lives on the container's own ephemeral filesystem, but uploads/plugins/themes persist via NFS. Cloud Run has no per-instance persistent block volume equivalent to GKE's StatefulSet PVC, so the upstream entrypoint re-copies the ClassicPress core application into /var/www/html on first boot of each container instance — expected, since those core files ship with the image and need no persistence. enable_nfs = true mounts Filestore at /var/www/html/wp-content by default, and the upstream entrypoint's copy logic explicitly skips an existing wp-content directory rather than overwriting it, so uploaded media, installed plugins, and themes under wp-content do carry over across cold starts, redeploys, and instance replacement — this is how persistence is actually achieved, not a gap.
  • CLASSICPRESS_SALT_SEED is generated automatically and stored in Secret Manager; the entrypoint derives all 8 WordPress-style AUTH_KEY/SALT values from it deterministically, so cookies and sessions survive restarts and agree across every cold-started instance without persisting wp-config.php state.
  • No auto-install — first login is manual. ClassicPress_Common generates no admin-password secret and sets no auto-install flag. ClassicPress creates its schema and admin account through its own first-run web installer once db-init has provisioned the empty database.
  • Two GCS buckets are created but unused by default. The variant's own storage_buckets default (data) and ClassicPress_Common's preset (classicpress-uploads) both get created (different name suffixes, so they don't collide) — neither is wired in as a gcs_volumes mount unless you add one.

2. Google Cloud Services & How to Explore Them​

All commands assume PROJECT and REGION are set. Service and resource names are reported in the deployment Outputs.

A. Cloud Run — the ClassicPress service​

ClassicPress runs as a Cloud Run v2 service that autoscales by request load between the minimum and maximum instance counts. Each deployment creates an immutable revision; traffic can be split across revisions for safe rollouts.

  • Console: Cloud Run → select the service for revisions, traffic, logs, and metrics.
  • CLI:
    gcloud run services list --project "$PROJECT" --region "$REGION"
    gcloud run services describe <service-name> --project "$PROJECT" --region "$REGION"
    gcloud run revisions list --service <service-name> --project "$PROJECT" --region "$REGION"

See App_CloudRun for scaling, concurrency, execution environment, and traffic splitting.

B. Cloud SQL for MySQL 8.0​

ClassicPress stores all application data (posts, pages, users, options, plugin/theme settings) in a managed Cloud SQL for MySQL 8.0 instance. By default the service connects over private-IP TCP (enable_cloudsql_volume = false); Cloud SQL MySQL accepts unencrypted TCP on the private range, so no SSL configuration is needed. On first deploy, an initialization Job (db-init) creates the application database and user and verifies the app user can connect.

  • Console: SQL → select the instance for connections, backups, flags, metrics.
  • CLI:
    gcloud sql instances list --project "$PROJECT"
    gcloud sql instances describe <instance-name> --project "$PROJECT"
    gcloud sql connect <instance-name> --user=<db-user> --database=<db-name> --project "$PROJECT"

The instance name, database, user, and password secret are in the Outputs. See App_CloudRun for the connection model, backups, and password rotation.

C. Cloud Storage​

Two Cloud Storage buckets are provisioned by default: a data bucket (declared by this variant's own storage_buckets default) and a classicpress-uploads bucket (declared by ClassicPress_Common). Neither is mounted into the container by default — media/plugin/theme persistence is instead handled by the NFS mount at /var/www/html/wp-content (see Section D); a gcs_volumes mount is an alternative only if you prefer GCS-backed storage over Filestore.

  • Console: Cloud Storage → Buckets.
  • CLI:
    gcloud storage buckets list --project "$PROJECT"
    gcloud storage ls gs://<bucket-name>/ # bucket names are in the Outputs

See App_CloudRun for GCS Fuse and CMEK options.

D. Cloud Filestore (NFS)​

enable_nfs = true is the default, mounting a shared Filestore instance at /var/www/html/wp-content. ClassicPress (a WordPress fork) reads/writes uploaded media, installed plugins, and themes under wp-content, and the upstream entrypoint's first-boot copy logic explicitly skips an existing wp-content directory, so this mount is the confirmed path that achieves persistence across restarts, redeploys, and cold starts. enable_nfs = true is also what makes redis_host = "" fall back to the NFS server's co-hosted Redis IP (see Group 21).

  • Console: Filestore → Instances.
  • CLI:
    gcloud filestore instances list --project "$PROJECT"

See App_CloudRun for NFS discovery and mount mechanics.

E. Secret Manager​

One ClassicPress-specific secret is generated automatically and stored in Secret Manager: CLASSICPRESS_SALT_SEED, a 64-character random seed from which the entrypoint derives all 8 WordPress-style AUTH_KEY/SECURE_AUTH_KEY/ LOGGED_IN_KEY/NONCE_KEY and their matching SALT values (SHA-256 of the seed plus a fixed per-key suffix). The database password is managed separately by the foundation.

  • Console: Security → Secret Manager.
  • CLI:
    gcloud secrets list --project "$PROJECT" --filter="name~classicpress"
    gcloud secrets versions access latest --secret=<secret-name> --project "$PROJECT"

See App_CloudRun for injection and rotation details.

F. Networking & ingress​

The service is reachable at its run.app URL by default (ingress_settings = "all"). An external HTTPS load balancer with a custom domain, Cloud CDN, and Cloud Armor can be layered on; ingress settings and VPC egress control connectivity.

  • Console: Cloud Run (service URL); Network services → Load balancing.
  • CLI:
    gcloud run services describe <service-name> --region "$REGION" --format='value(status.url)'
    gcloud compute addresses list --project "$PROJECT"

See App_CloudRun.

G. Cloud Logging & Monitoring​

Container logs flow to Cloud Logging; Cloud Run and Cloud SQL metrics flow to Cloud Monitoring, with optional uptime checks and alert policies.

  • Console: Logging → Logs Explorer; Monitoring → Dashboards / Alerting.
  • CLI:
    gcloud run services logs read <service-name> --project "$PROJECT" --region "$REGION" --limit 50

3. ClassicPress Application Behaviour​

  • First-deploy database setup. An initialization Job (db-init, mysql:8.0-debian) waits for connectivity (Unix socket if enable_cloudsql_volume = true, otherwise TCP via DB_IP), idempotently creates the application database and user with CREATE USER IF NOT EXISTS / GRANT ALL PRIVILEGES, verifies the app user can connect, and gracefully shuts down the Cloud SQL Auth Proxy sidecar if one was started. The job is safe to re-run (execute_on_apply = true, max_retries = 3).
  • No separate migration job — manual first-run install. There is no auto-install flag for ClassicPress. Once db-init has provisioned the empty database, ClassicPress creates its own schema and admin account through the first-run web installer (/wp-admin/install.php in the upstream image). Visit the service URL after first deploy and complete the installer to set the admin username, password, and email — there is no generated admin-password secret.
  • DB env-var aliasing over TCP. The Foundation injects DB_IP (the Cloud SQL private IP on Cloud Run), DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD; ClassicPress reads CLASSICPRESS_DB_*. The grafted entrypoint.sh builds CLASSICPRESS_DB_HOST as <DB_IP>:<DB_PORT> (or the localhost:<socket> form if a Cloud SQL socket directory is found under enable_cloudsql_volume = true) and aliases the rest, before handing off to the upstream docker-entrypoint.sh.
  • Auth keys/salts are derived, not stored individually. CLASSICPRESS_SALT_SEED is the only generated secret; the entrypoint computes all 8 CLASSICPRESS_AUTH_KEY / ..._SALT values as sha256(seed-<key-name>), so every restart and every cold-started instance agrees on the same values without persisting wp-config.php state — sessions and login cookies remain valid across instance churn even though the filesystem does not.
  • The install's core files live on the container's ephemeral filesystem; wp-content persists via NFS. The upstream docker-entrypoint.sh writes wp-config.php and copies the ClassicPress application into /var/www/html on first boot of each container instance. With enable_nfs = true (the default), Filestore is mounted directly at /var/www/html/wp-content, and the copy logic explicitly skips an existing wp-content directory rather than overwriting it — so uploaded media, plugins, and themes installed via wp-admin survive whenever the instance recycles (redeploy, scale-to-zero-and-back, instance replacement). Only the core files outside wp-content are freshly copied each time, which is expected since they ship with the image.
  • NFS mount path is the confirmed persistence mechanism. enable_nfs = true mounts Filestore at /var/www/html/wp-content by default. ClassicPress (a WordPress fork) reads/writes uploaded media, plugins, and themes under wp-content relative to its webroot, and the upstream entrypoint's copy-skip logic for an existing wp-content directory is exactly what makes mounting NFS there safe and effective — this is how persistence is actually achieved, not spare/unused storage.
  • php_memory_limit, upload_max_filesize, and post_max_size are accepted but not currently wired into a PHP setting. These variables are forwarded through to ClassicPress_Common, but its config.environment_variables does not set any corresponding PHP_*/UPLOAD_MAX_FILESIZE/POST_MAX_SIZE env var for the upstream image to read — changing them has no observed effect on the deployed container today.
  • Redis is optional and off by default. When enable_redis = true, leaving redis_host empty lets the Foundation fall back to the co-hosted NFS-server Redis IP (requires enable_nfs = true); setting redis_host explicitly points ClassicPress at an external Redis/Memorystore instance instead.
  • Health paths. The startup probe is TCP on port 80 (generous failure_threshold = 20, allowing time for the upstream image's own entrypoint to populate the empty /var/www/html on first boot of a fresh instance). The liveness probe is HTTP GET / with a 300-second initial delay — a 200 (installed site) or a 302 redirect to the installer (fresh install) both count as healthy.
  • Inspect job execution and running config:
    gcloud run jobs list --project "$PROJECT" --region "$REGION"
    gcloud run jobs executions list --job <job-name> --project "$PROJECT" --region "$REGION"
    gcloud run services describe <service-name> --region "$REGION" \
    --format='value(spec.template.spec.containers[0].env)'

4. Configuration Variables​

Variables are grouped exactly as they appear on the deployment platform (by their {{UIMeta group=N}} tag, not by the .tf file's section comments, which are occasionally out of sync with the tags). Only settings specific to or notable for ClassicPress are listed; every other input is inherited from App_CloudRun with its standard behaviour.

Group 1 — Project & Identity​

VariableDefaultDescription
project_id(required)Target Google Cloud project.
regionus-central1Region for the service and regional resources.

Group 2 — Deployment Environment​

VariableDefaultDescription
tenant_iddemoShort suffix that makes resource names unique per environment.
support_users[]Emails granted project access and monitoring alerts.
resource_labels{}Labels applied to all resources.

Group 3 — Application Identity​

VariableDefaultDescription
application_nameclassicpressBase name for resources. Do not change after first deploy.
display_nameClassicPressHuman-readable name shown in the Console.
descriptionClassicPress wiki on Cloud RunService description.
application_versionlatestMaps to the classicpress/classicpress image tag via the app-specific CLASSICPRESS_VERSION build arg (latest resolves to php8.3-apache; the generic APP_VERSION build arg the Foundation injects would otherwise silently overwrite a same-named arg).
php_memory_limit512MAccepted but not currently wired into any PHP setting — see Section 3.
upload_max_filesize / post_max_size64M / 64MSame caveat as above; validated at plan time (upload_max_filesize ≤ post_max_size) but not otherwise applied.

Group 4 — Runtime & Scaling​

VariableDefaultDescription
deploy_applicationtrueSet false to provision infrastructure only.
container_image_sourcecustomBuilds the thin FROM classicpress/classicpress image with the grafted entrypoint shim — required, the stock image cannot alias DB_* on its own.
cpu_limit1000mCPU per instance; ClassicPress with MySQL needs at least 1 vCPU.
memory_limit2GiMemory per instance; minimum ~512Mi for PHP/Apache.
min_instance_count00 enables scale-to-zero — but see the ephemeral-filesystem caveat in Section 3 before relying on it in production.
max_instance_count1Keep at 1 — the container filesystem is per-instance and not shared.
container_port80ClassicPress runs on Apache, port 80.
execution_environmentgen2Gen2 required for NFS and GCS Fuse mounts.
timeout_seconds300Maximum request duration (0–3600 seconds).
enable_cloudsql_volumefalseDefault is private-IP TCP; set true for the Cloud SQL Auth Proxy Unix socket instead.
enable_image_mirroringtrueMirror the built image into Artifact Registry.
traffic_split[]Split traffic across revisions for staged rollouts.
max_revisions_to_retain7Declared for convention parity; not referenced by this module's deployment.

Group 5 — Access & Ingress Control​

VariableDefaultDescription
ingress_settingsallPublic ingress for the CMS front end and admin UI.
vpc_egress_settingPRIVATE_RANGES_ONLYRoute only RFC 1918 traffic via VPC.
enable_iapfalseRequire Google sign-in for the whole service (including the public site).
iap_authorized_users / iap_authorized_groups[]Who may access through IAP.

Group 6 — Environment Variables & Secrets​

VariableDefaultDescription
environment_variables{}Extra non-secret settings, merged with ClassicPress_Common's defaults (DB_PORT, CLASSICPRESS_TABLE_PREFIX=cp_, CLASSICPRESS_DB_CHARSET=utf8mb4).
secret_environment_variables{}Map of env var → Secret Manager secret name. CLASSICPRESS_SALT_SEED is injected automatically and does not need to be set here.
secret_propagation_delay30Seconds to wait after secret creation before proceeding.
secret_rotation_period2592000sSecret Manager rotation notification frequency.

Group 7 — Backup & Restore​

VariableDefaultDescription
backup_schedule0 2 * * *Automated backup cron (UTC).
backup_retention_days7Retention; raise for production/compliance.
enable_backup_import / backup_source / backup_uri / backup_formatrestore optionsRestore a MySQL dump from GCS or Google Drive on deploy.

Group 8 — CI/CD & Binary Authorization​

Standard App_CloudRun Cloud Build / Cloud Deploy integration — see App_CloudRun. Key inputs: enable_cicd_trigger, github_repository_url, github_token, enable_cloud_deploy, enable_binary_authorization.

Group 9 — Custom SQL Scripts​

VariableDefaultDescription
enable_custom_sql_scripts / custom_sql_scripts_bucket / custom_sql_scripts_path / custom_sql_scripts_use_rootoffRun SQL from a GCS bucket after provisioning.

Group 10 — Load Balancer, CDN & Image Retention​

VariableDefaultDescription
enable_cloud_armorfalseProvision Global HTTPS LB + Cloud Armor WAF.
admin_ip_ranges[]CIDR ranges exempted from WAF rules.
application_domains[]Custom domain names for the HTTPS LB.
enable_cdnfalseEnable Cloud CDN on the HTTPS LB backend.
max_images_to_retain / delete_untagged_images / image_retention_days7 / true / 30Artifact Registry cleanup policy for the built image.

Group 11 — Storage & Filesystem​

VariableDefaultDescription
create_cloud_storagetrueCreate GCS buckets defined in storage_buckets.
storage_buckets[{ name_suffix = "data" }]Additional GCS bucket beyond ClassicPress_Common's own classicpress-uploads bucket (both are created; neither is mounted by default).
enable_nfstrueOn by default, mounted at /var/www/html/wp-content — this is how upload/plugin/theme persistence is achieved (see Section 3).
nfs_mount_path/var/www/html/wp-contentMount path inside the container. The upstream entrypoint's copy logic skips an existing wp-content directory, so mounting here is safe.
gcs_volumes[]GCS Fuse volume mounts (requires gen2); add an entry mounted at /var/www/html/wp-content/uploads for real media persistence.
manage_storage_kms_iam / enable_artifact_registry_cmekfalseCMEK options.

Group 12 — Database Backend​

VariableDefaultDescription
database_typeMYSQL_8_0Hardcoded by ClassicPress_Common; changing the variable does not change the deployed database engine.
db_nameclassicpressMySQL database name. Immutable after first deploy.
db_userclassicpressApplication database user. Password auto-generated in Secret Manager.
database_password_length32Generated password length (16–64).
enable_auto_password_rotation / rotation_propagation_delay_secoffDB password rotation.
db_host_env_var_name / db_user_env_var_name / db_name_env_var_name / db_port_env_var_name / service_url_env_var_name""Declared for convention mirroring only — main.tf hardcodes empty aliases for this variant, so setting these has no effect; ClassicPress's own entrypoint handles the CLASSICPRESS_DB_* aliasing.

Group 13 — Jobs & Scheduled Tasks​

VariableDefaultDescription
initialization_jobs[]Leave empty to use the built-in db-init job from ClassicPress_Common.
cron_jobs[]No platform-scheduled recurring tasks by default.

Group 14 — Observability & Health​

VariableDefaultDescription
startup_probeTCP port 80, failure_threshold = 20Generous threshold for first-boot population of /var/www/html.
liveness_probeHTTP /, 300s initial delayA 200 or a 302-to-installer both count as healthy.
uptime_check_config{ enabled=false, path="/" }Cloud Monitoring uptime check; disabled by default.
alert_policies[]Metric alert policies.

Group 21 — Redis Cache​

VariableDefaultDescription
enable_redisfalseEnables ClassicPress's WordPress-style object cache backend.
redis_host""Leave empty to fall back to the Foundation's own REDIS_HOST injection (the NFS-VM Redis IP when enable_nfs = true); set explicitly for an external Redis/Memorystore instance.
redis_port6379Redis port.
redis_auth""Optional Redis auth password (sensitive).

Group 22 — VPC Service Controls & Audit Logging​

VariableDefaultDescription
enable_vpc_scfalseEnforce a VPC-SC perimeter (requires organization_id).
vpc_cidr_ranges / vpc_sc_dry_run(set)Access level CIDRs / dry-run mode.
enable_audit_loggingfalseDetailed Cloud Audit Logs.

5. Outputs​

Returned on a successful deployment — the quickest way to locate and explore the running resources.

OutputDescription
service_nameCloud Run service name.
service_urlDefault run.app URL of the service.
service_locationRegion the service runs in.
stage_servicesStage-specific service URLs (Cloud Deploy).
load_balancer_ip / load_balancer_urlExternal HTTPS load balancer IP / URL (when enabled).
database_instance_nameCloud SQL instance name.
database_name / database_userApplication database name / user.
database_password_secretSecret Manager secret holding the DB password.
database_host / database_portDB endpoint / port.
storage_bucketsCreated Cloud Storage buckets (data and classicpress-uploads).
network_name / network_exists / regionsVPC network, presence, regions.
container_image / container_registryDeployed image and Artifact Registry repo.
monitoring_enabled / monitoring_notification_channels / uptime_check_namesMonitoring status, channels, uptime checks.
initialization_jobsNames of the setup jobs.
deployment_id / tenant_id / resource_prefixNaming identifiers.
project_id / project_numberProject identifiers.
cicd_enabled / github_repository_url / github_repository_owner / github_repository_name / cicd_configurationCI/CD status and details.
artifact_registry_repository / cloudbuild_trigger_name / cloudbuild_trigger_idRegistry and build trigger.
vpc_sc_enabled / vpc_sc_perimeter_name / vpc_sc_dry_run_modeVPC-SC status.
audit_logging_enabled / artifact_registry_cmek_enabledAudit logging and CMEK status.

6. Configuration Pitfalls & Sensible Defaults​

Risk: Critical (data loss / outage / security) — High (service degraded) — Medium (cost or partial degradation) — Low (minor).

Inherited plan-time validation. This module passes its configuration through the App_CloudRun foundation engine, which validates values and combinations at plan time — a read replica without its primary, IAP with no authorized identities, a gen1 runtime with NFS/GCS mounts, an out-of-range redis_port/backup_retention_days. Invalid configuration fails the plan with a clear, named error before any resource is created. ClassicPress also runs its own precondition (validations.tf) for upload_max_filesize ≤ post_max_size.

SettingSensible valueRiskConsequence if wrong
Media/plugin persistence at /var/www/html/wp-contentKeep enable_nfs = true (the default)LowWith enable_nfs = true, Filestore is mounted at /var/www/html/wp-content and the upstream entrypoint's copy logic skips it on boot, so uploaded media and wp-admin-installed plugins/themes survive cold starts. Disabling enable_nfs removes this persistence — every cold-started instance would then start from an empty wp-content.
CLASSICPRESS_SALT_SEED (auto-generated)Never rotate after first bootCriticalRotating it invalidates all signed cookies and logged-in sessions across every instance.
database_typeLeave at default (MYSQL_8_0)CriticalClassicPress_Common's db-init job and entrypoint are MySQL-specific; the value is hardcoded regardless of the variable, but relying on the variable to select an engine is a dead end.
db_name / db_userSet onceCriticalImmutable after first deploy; renaming recreates the DB/user and orphans all data.
enable_backup_importfalse unless restoringCriticalEnabling without a valid backup_uri fails the import job.
max_instance_count1Mediumwp-content (uploads/plugins/themes) is shared via the NFS mount, but the ClassicPress core files outside it are copied independently per instance; scaling beyond 1 has not been validated for concurrent-write safety on wp-content.
First-run admin setupComplete /wp-admin/install.php promptly after deployHighUntil the installer runs, the site has no schema and no admin account — there is no generated admin-password secret to recover with.
enable_nfstrueMediumProvisions and pays for a Filestore instance mounted at /var/www/html/wp-content — the confirmed mechanism for upload/plugin/theme persistence (see Section 3). Disabling it removes that persistence.
php_memory_limit / upload_max_filesize / post_max_sizeAny valueLowCurrently not wired into a PHP setting — do not assume changing them affects upload limits or PHP memory in the deployed container.
memory_limit2GiMediumBelow ~512Mi the PHP/Apache container risks OOM under load or with heavier plugins.
min_instance_count1 for productionMediumScale-to-zero (0) adds cold-start latency while the core files are re-copied into /var/www/html; uploads/plugins/themes under wp-content are unaffected since they persist via NFS.
enable_cloud_armorenable for productionMediumThe admin UI and public site are reachable without WAF protection by default.
backup_retention_days7 (raise for prod)MediumToo short for compliance retention.

For the foundation behaviour referenced throughout — service identity, scaling and concurrency, ingress and load balancing, CI/CD, Cloud Armor, IAP, Binary Authorization, VPC-SC, backups, and image mirroring — see App_CloudRun. ClassicPress-specific application configuration shared with the GKE variant lives in the ClassicPress_Common module (no standalone ClassicPress_Common.md guide exists yet in this docs set); see also ClassicPress_GKE for how the same application behaves on a StatefulSet with a per-pod block PVC.

Need RAD to do something it does not do yet? Request it on the roadmap, or vote on what is already there.