Skip to content

Roots Bedrock

CloudPress follows the default WordPress installation process. If you wish to use Roots Bedrock to manage your site, you will need to manually install it. Below you will find general instructions.

Overview

CloudPress will perform the following actions on each container boot:

  1. Set the Database Host
  2. Install or update environments/production.php with configuration values specific to CloudPress.
  3. Install the CloudPress mu plugin to enable SSO.

Features Not Included with Bedrock

The following steps that we automate in our normal installation, will not occur in your bedrock environment.

  • Installation of Object Cache Pro
  • Installation of nginx cache helper
  • CloudPress nav helper in wp-admin
  • This displays a login link to allow easy navigation back to the CloudPress interface.

You will need to manually install those plugins if you wish to benefit from their features. For Object Cache Pro, please contact support for a license key.

Install

Using the ssh credentials, login and navigate to /home/sftpuser/apps/{{ container name }}/wordpress/html and run:

composer create-project roots/bedrock

Configure

cd bedrock && cp .env.example .env

Gather the database credentials from the original WordPress site: /home/sftpuser/apps/{{ container name }}/wordpress/html/wordpress/wp-config.php

Set the following params:

DB_NAME='database_name'
DB_USER='database_user'
DB_PASSWORD='database_password'
DB_HOST='localhost'
WP_ENV='production'
WP_HOME='https://example.com'

Finally, copy salts from https://roots.io/salts.html into the env file.

NOTE: DB_HOST will be automatically set on each restart of your container.

Next, create your database and perform the WordPress installation (unless migrating an existing site):

mysql -h $DB_HOST -u $DB_USER \
      -p$DB_PASSWORD --skip-column-names \
      -e "CREATE DATABASE IF NOT EXISTS $DB_NAME;"

wp core install --url=$WORDPRESS_URL \
                --title="$WORDPRESS_TITLE" \
                --admin_user=$WORDPRESS_USER \
                --admin_password=$WORDPRESS_PASSWORD \
                --admin_email="$WORDPRESS_EMAIL" \
                --skip-email

Replace the above variables (e.g. $WORDPRESS_EMAIL) with your own values.

CloudPress Configuration

Update your /home/sftpuser/apps/{{ container name }}/wordpress/cloudpress.yml file with the following:

site:
  webroot: html/bedrock/web
  wordpress:
    template: roots-bedrock
    path: html/bedrock

Now, in the CloudPress interface, navigate to settings and RESTART your website to update nginx.

It may take up to 10 minutes for the CloudPress interface to show users, plugins, and themes from your new site. Please wait for that to be updated before using the CloudPress interface to install and manage plugins.