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 own | In a project RAD manages for you | |
|---|---|---|
| Module fee, once per deployment | 75 credits (US$7.50 at the top-up price) | 67.5 credits (10% lower) |
| Build time | A few credits per build (roughly 3–6) | The same |
| Google Cloud running cost | Billed 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 what | You own the project and its billing; RAD deploys and updates it | RAD 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 SSD | US$51 |
| NFS/cache file server (small VM) | US$13.43 |
| Cloud NAT and networking | US$5 |
| Cloud Storage (add-ons, backups) | US$1 |
| Total | about 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-2about $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:
| Capability | Google Cloud service | Notes |
|---|---|---|
| Compute | Cloud Run v2 | PHP/Apache service on port 80, 1 vCPU / 2 GiB by default; scale-to-zero (min_instance_count = 0) is the default |
| Database | Cloud SQL for MySQL 8.0 | Fixed — ClassicPress_Common hardcodes database_type = "MYSQL_8_0" |
| File persistence | Cloud Filestore (NFS), optional | Mounted at /var/www/html/wp-content by default (enable_nfs = true) — see Section 3 for how this achieves upload/plugin/theme persistence |
| Object storage | Cloud Storage | Both 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 |
| Secrets | Secret Manager | Auto-generated CLASSICPRESS_SALT_SEED (derives the 8 WordPress-style auth keys/salts); database password |
| Ingress | Cloud Run URL / Cloud Load Balancing | Default 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'sconfigsetsdatabase_type = "MYSQL_8_0"directly; the variant's owndatabase_typevariable is largely decorative — overriding it breaks the MySQL-specificdb-initjob and entrypoint. Leave it at the default. - Custom build, not prebuilt.
container_image_sourcedefaults to"custom"— Cloud Build produces a thin imageFROM classicpress/classicpressthat grafts an entrypoint shim aliasing the Foundation's injectedDB_*vars onto ClassicPress'sCLASSICPRESS_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_volumedefaults tofalse(the variant explicitly forces this value into the app config, overriding whateverClassicPress_Commonmight otherwise set); the entrypoint buildsCLASSICPRESS_DB_HOSTfromDB_IP:DB_PORT. MySQL on the Cloud SQL private range needs no SSL. Setenable_cloudsql_volume = trueto 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/htmlon first boot of each container instance — expected, since those core files ship with the image and need no persistence.enable_nfs = truemounts Filestore at/var/www/html/wp-contentby default, and the upstream entrypoint's copy logic explicitly skips an existingwp-contentdirectory rather than overwriting it, so uploaded media, installed plugins, and themes underwp-contentdo carry over across cold starts, redeploys, and instance replacement — this is how persistence is actually achieved, not a gap. CLASSICPRESS_SALT_SEEDis generated automatically and stored in Secret Manager; the entrypoint derives all 8 WordPress-styleAUTH_KEY/SALTvalues from it deterministically, so cookies and sessions survive restarts and agree across every cold-started instance without persistingwp-config.phpstate.- No auto-install — first login is manual.
ClassicPress_Commongenerates no admin-password secret and sets no auto-install flag. ClassicPress creates its schema and admin account through its own first-run web installer oncedb-inithas provisioned the empty database. - Two GCS buckets are created but unused by default. The variant's own
storage_bucketsdefault (data) andClassicPress_Common's preset (classicpress-uploads) both get created (different name suffixes, so they don't collide) — neither is wired in as agcs_volumesmount 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 ifenable_cloudsql_volume = true, otherwise TCP viaDB_IP), idempotently creates the application database and user withCREATE 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-inithas provisioned the empty database, ClassicPress creates its own schema and admin account through the first-run web installer (/wp-admin/install.phpin 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 readsCLASSICPRESS_DB_*. The graftedentrypoint.shbuildsCLASSICPRESS_DB_HOSTas<DB_IP>:<DB_PORT>(or thelocalhost:<socket>form if a Cloud SQL socket directory is found underenable_cloudsql_volume = true) and aliases the rest, before handing off to the upstreamdocker-entrypoint.sh. - Auth keys/salts are derived, not stored individually.
CLASSICPRESS_SALT_SEEDis the only generated secret; the entrypoint computes all 8CLASSICPRESS_AUTH_KEY/..._SALTvalues assha256(seed-<key-name>), so every restart and every cold-started instance agrees on the same values without persistingwp-config.phpstate — 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-contentpersists via NFS. The upstreamdocker-entrypoint.shwriteswp-config.phpand copies the ClassicPress application into/var/www/htmlon first boot of each container instance. Withenable_nfs = true(the default), Filestore is mounted directly at/var/www/html/wp-content, and the copy logic explicitly skips an existingwp-contentdirectory 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 outsidewp-contentare freshly copied each time, which is expected since they ship with the image. - NFS mount path is the confirmed persistence mechanism.
enable_nfs = truemounts Filestore at/var/www/html/wp-contentby default. ClassicPress (a WordPress fork) reads/writes uploaded media, plugins, and themes underwp-contentrelative to its webroot, and the upstream entrypoint's copy-skip logic for an existingwp-contentdirectory 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, andpost_max_sizeare accepted but not currently wired into a PHP setting. These variables are forwarded through toClassicPress_Common, but itsconfig.environment_variablesdoes not set any correspondingPHP_*/UPLOAD_MAX_FILESIZE/POST_MAX_SIZEenv 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, leavingredis_hostempty lets the Foundation fall back to the co-hosted NFS-server Redis IP (requiresenable_nfs = true); settingredis_hostexplicitly 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/htmlon first boot of a fresh instance). The liveness probe is HTTPGET /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
| Variable | Default | Description |
|---|---|---|
project_id | (required) | Target Google Cloud project. |
region | us-central1 | Region for the service and regional resources. |
Group 2 — Deployment Environment
| Variable | Default | Description |
|---|---|---|
tenant_id | demo | Short 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
| Variable | Default | Description |
|---|---|---|
application_name | classicpress | Base name for resources. Do not change after first deploy. |
display_name | ClassicPress | Human-readable name shown in the Console. |
description | ClassicPress wiki on Cloud Run | Service description. |
application_version | latest | Maps 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_limit | 512M | Accepted but not currently wired into any PHP setting — see Section 3. |
upload_max_filesize / post_max_size | 64M / 64M | Same caveat as above; validated at plan time (upload_max_filesize ≤ post_max_size) but not otherwise applied. |
Group 4 — Runtime & Scaling
| Variable | Default | Description |
|---|---|---|
deploy_application | true | Set false to provision infrastructure only. |
container_image_source | custom | Builds the thin FROM classicpress/classicpress image with the grafted entrypoint shim — required, the stock image cannot alias DB_* on its own. |
cpu_limit | 1000m | CPU per instance; ClassicPress with MySQL needs at least 1 vCPU. |
memory_limit | 2Gi | Memory per instance; minimum ~512Mi for PHP/Apache. |
min_instance_count | 0 | 0 enables scale-to-zero — but see the ephemeral-filesystem caveat in Section 3 before relying on it in production. |
max_instance_count | 1 | Keep at 1 — the container filesystem is per-instance and not shared. |
container_port | 80 | ClassicPress runs on Apache, port 80. |
execution_environment | gen2 | Gen2 required for NFS and GCS Fuse mounts. |
timeout_seconds | 300 | Maximum request duration (0–3600 seconds). |
enable_cloudsql_volume | false | Default is private-IP TCP; set true for the Cloud SQL Auth Proxy Unix socket instead. |
enable_image_mirroring | true | Mirror the built image into Artifact Registry. |
traffic_split | [] | Split traffic across revisions for staged rollouts. |
max_revisions_to_retain | 7 | Declared for convention parity; not referenced by this module's deployment. |
Group 5 — Access & Ingress Control
| Variable | Default | Description |
|---|---|---|
ingress_settings | all | Public ingress for the CMS front end and admin UI. |
vpc_egress_setting | PRIVATE_RANGES_ONLY | Route only RFC 1918 traffic via VPC. |
enable_iap | false | Require 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
| Variable | Default | Description |
|---|---|---|
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_delay | 30 | Seconds to wait after secret creation before proceeding. |
secret_rotation_period | 2592000s | Secret Manager rotation notification frequency. |
Group 7 — Backup & Restore
| Variable | Default | Description |
|---|---|---|
backup_schedule | 0 2 * * * | Automated backup cron (UTC). |
backup_retention_days | 7 | Retention; raise for production/compliance. |
enable_backup_import / backup_source / backup_uri / backup_format | restore options | Restore 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
| Variable | Default | Description |
|---|---|---|
enable_custom_sql_scripts / custom_sql_scripts_bucket / custom_sql_scripts_path / custom_sql_scripts_use_root | off | Run SQL from a GCS bucket after provisioning. |
Group 10 — Load Balancer, CDN & Image Retention
| Variable | Default | Description |
|---|---|---|
enable_cloud_armor | false | Provision 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_cdn | false | Enable Cloud CDN on the HTTPS LB backend. |
max_images_to_retain / delete_untagged_images / image_retention_days | 7 / true / 30 | Artifact Registry cleanup policy for the built image. |
Group 11 — Storage & Filesystem
| Variable | Default | Description |
|---|---|---|
create_cloud_storage | true | Create 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_nfs | true | On 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-content | Mount 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_cmek | false | CMEK options. |
Group 12 — Database Backend
| Variable | Default | Description |
|---|---|---|
database_type | MYSQL_8_0 | Hardcoded by ClassicPress_Common; changing the variable does not change the deployed database engine. |
db_name | classicpress | MySQL database name. Immutable after first deploy. |
db_user | classicpress | Application database user. Password auto-generated in Secret Manager. |
database_password_length | 32 | Generated password length (16–64). |
enable_auto_password_rotation / rotation_propagation_delay_sec | off | DB 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
| Variable | Default | Description |
|---|---|---|
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
| Variable | Default | Description |
|---|---|---|
startup_probe | TCP port 80, failure_threshold = 20 | Generous threshold for first-boot population of /var/www/html. |
liveness_probe | HTTP /, 300s initial delay | A 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
| Variable | Default | Description |
|---|---|---|
enable_redis | false | Enables 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_port | 6379 | Redis port. |
redis_auth | "" | Optional Redis auth password (sensitive). |
Group 22 — VPC Service Controls & Audit Logging
| Variable | Default | Description |
|---|---|---|
enable_vpc_sc | false | Enforce a VPC-SC perimeter (requires organization_id). |
vpc_cidr_ranges / vpc_sc_dry_run | (set) | Access level CIDRs / dry-run mode. |
enable_audit_logging | false | Detailed Cloud Audit Logs. |
5. Outputs
Returned on a successful deployment — the quickest way to locate and explore the running resources.
| Output | Description |
|---|---|
service_name | Cloud Run service name. |
service_url | Default run.app URL of the service. |
service_location | Region the service runs in. |
stage_services | Stage-specific service URLs (Cloud Deploy). |
load_balancer_ip / load_balancer_url | External HTTPS load balancer IP / URL (when enabled). |
database_instance_name | Cloud SQL instance name. |
database_name / database_user | Application database name / user. |
database_password_secret | Secret Manager secret holding the DB password. |
database_host / database_port | DB endpoint / port. |
storage_buckets | Created Cloud Storage buckets (data and classicpress-uploads). |
network_name / network_exists / regions | VPC network, presence, regions. |
container_image / container_registry | Deployed image and Artifact Registry repo. |
monitoring_enabled / monitoring_notification_channels / uptime_check_names | Monitoring status, channels, uptime checks. |
initialization_jobs | Names of the setup jobs. |
deployment_id / tenant_id / resource_prefix | Naming identifiers. |
project_id / project_number | Project identifiers. |
cicd_enabled / github_repository_url / github_repository_owner / github_repository_name / cicd_configuration | CI/CD status and details. |
artifact_registry_repository / cloudbuild_trigger_name / cloudbuild_trigger_id | Registry and build trigger. |
vpc_sc_enabled / vpc_sc_perimeter_name / vpc_sc_dry_run_mode | VPC-SC status. |
audit_logging_enabled / artifact_registry_cmek_enabled | Audit 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
gen1runtime with NFS/GCS mounts, an out-of-rangeredis_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) forupload_max_filesize ≤ post_max_size.
| Setting | Sensible value | Risk | Consequence if wrong |
|---|---|---|---|
Media/plugin persistence at /var/www/html/wp-content | Keep enable_nfs = true (the default) | Low | With 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 boot | Critical | Rotating it invalidates all signed cookies and logged-in sessions across every instance. |
database_type | Leave at default (MYSQL_8_0) | Critical | ClassicPress_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_user | Set once | Critical | Immutable after first deploy; renaming recreates the DB/user and orphans all data. |
enable_backup_import | false unless restoring | Critical | Enabling without a valid backup_uri fails the import job. |
max_instance_count | 1 | Medium | wp-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 setup | Complete /wp-admin/install.php promptly after deploy | High | Until the installer runs, the site has no schema and no admin account — there is no generated admin-password secret to recover with. |
enable_nfs | true | Medium | Provisions 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_size | Any value | Low | Currently not wired into a PHP setting — do not assume changing them affects upload limits or PHP memory in the deployed container. |
memory_limit | 2Gi | Medium | Below ~512Mi the PHP/Apache container risks OOM under load or with heavier plugins. |
min_instance_count | 1 for production | Medium | Scale-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_armor | enable for production | Medium | The admin UI and public site are reachable without WAF protection by default. |
backup_retention_days | 7 (raise for prod) | Medium | Too 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.
Related guides
- Hands-on lab: ClassicPress on Cloud Run — deploy it step by step, with the console screens and commands at each stage.
- ClassicPress on GKE Autopilot — the same application on Kubernetes, for when you need the other deployment target.
- ClassicPress Common — Shared Application Configuration — the configuration shared by both deployment targets.
Need RAD to do something it does not do yet? Request it on the roadmap, or vote on what is already there.