Skip to main content

WordPress on Kubernetes

WordPress (Bedrock) logoWordPress (Bedrock) logo

WordPress with Composer, a real .env and a web root that stays out of reach.

larakube wordpress:newlarakube wp:new
🟡 Not yet verified🏘️ Joins the Plex CommonsPHPScaffolds via official CLI

LaraKube CLI runs WordPress the way Roots Bedrock does: plugins and core managed by Composer, configuration in .env, and a web root that keeps your code out of reach. You get the production image, the Kubernetes manifests and the wiring Bedrock expects.

Not yet verified

The WordPress scaffolder is written but has not been run end to end yet. Try it, but don't promise it to a client until this badge turns green.

🚀 Create a project

larakube wordpress:new blog

wp:new is an alias. LaraKube CLI runs composer create-project roots/bedrock inside a container, then asks:

ChoiceOptionsWith --fast
PHP versionSupported PHP versionsPHP 8.4
DatabaseMySQL, MariaDB — the two WordPress supportsMySQL
CacheRedis (recommended), MemcachedRedis
Object storage for mediaMinIO (recommended), SeaweedFS, GarageMinIO
SearchNone, Typesense (with the "Search with Typesense" plugin), Meilisearch (no maintained official plugin)None

Search plugins are installed by you; LaraKube CLI provisions the engine.

🧱 What LaraKube CLI sets up

WhatWhy
Web root at web/Bedrock serves only web/, so vendor/ and your config are never reachable over HTTP
WP_HOME, WP_SITEURL, WP_ENV in .envBedrock refuses to start without them
Salts, generated once per env fileNever regenerated on later runs, so nobody gets logged out; each environment gets its own
Uploads on a volume at web/app/uploadsMedia survives pod restarts and redeploys, and is kept out of the image
DB_NAME and DB_USERMapped from the database values every environment already receives
Health check at /wp/wp-includes/version.phpAnswers without touching the database, so a database blip doesn't restart the pod

🏘️ Shared services from the Plex Commons

After scaffolding, wordpress:new joins the cluster's Plex Commons for its database, cache and storage. Pass --no-plex to keep your own pods.

💻 Run it locally

cd blog
larakube up

Open the site and WordPress's installer takes it from there.

☁️ Deploy

larakube env production
larakube cloud:deploy production

The production image carries what composer install produced. There's no Node build step, because Bedrock has none.

➡️ Next