Deploy WordPress to Presslabs Stack

Find out how to deploy your WordPress code to the Presslabs Stack.


Getting started

Deploying a site is as simple as following these three steps:

  1. Add the Presslabs helm chart repository

    $ helm repo add presslabs
    $ helm repo update
  2. Deploy a site, with main domain pointing to

    $ helm upgrade -i my-site presslabs/wordpress-site --set[0]
  3. Point the domain to the ingress IP

    $ kubectl get -n presslabs-system service stack-nginx-ingress-controller

Deploy a site from a git repository


Deploying from git repository requires that your WP_CONTENT_DIR is checked in. If you want to use Bedrock it is highly recommended that you deploy using a docker image.

Deploying from git is as simple as:

$ helm upgrade -i my-site presslabs/wordpress-site --set[0] \
	--set code.git.repository= \
	--set code.git.reference=master
  • code.git.repository is a valid git repository origin. It supports HTTP, HTTPS, GIT and the SSH protocol.
  • code.git.reference reference to deploy. It can be a commit, branch or tag and defaults to master

Using a private repository

In order to use a private repository, you must generate a SSH key pair and set the private to the deployment. To do that, you need to add --set-file code.git.ssh_private_key=PATH_TO_THE_PRIVATE_KEY:

$ ssh-keygen -f id_rsa -P ''
$ helm upgrade -i my-site presslabs/wordpress-site --set[0] \
	--set code.git.repository= \
	--set code.git.reference=master \
	--set-file code.git.ssh_private_key=id_rsa

Deploy a custom Docker image

You can run a custom image, bundled with your own code and dependencies. You can specify it when deploying by setting image.repository and image.tag.

$ helm upgrade my-site presslabs/wordpress-site --reuse-values \
	--set image.tag=5.2.2

What’s next?