Skip to content

Roots Bedrock

CloudPress installs WordPress the standard way. To manage your site with Roots Bedrock instead, install it yourself over SSH, then point the site at it.

CloudPress keeps your database host and the single sign-on plugin set up for you on every restart.

Before you start

  • You have SSH access to the site. See Accessing your files.
  • Bedrock sites don't get these features from a standard install: object caching, page-cache purging when content changes, and the dashboard login link in wp-admin. Install those plugins yourself if you want them. For Object Cache Pro, contact support for a license key.

Steps

  1. Install Bedrock. Log in over SSH, go to /home/sftpuser/apps/{{ container name }}/wordpress/html and run:

    composer create-project roots/bedrock
    
  2. Create the environment file.

    cd bedrock && cp .env.example .env
    
  3. Set the database and site values. Copy the database credentials from the original site's /home/sftpuser/apps/{{ container name }}/wordpress/html/wordpress/wp-config.php and set these in .env. DB_HOST is set automatically on every restart.

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

    Then copy the salts from roots.io/salts into the same file.

  4. Create the database and install WordPress. Skip the wp core install command if you're migrating an existing site. Replace the variables, such as $WORDPRESS_EMAIL, with your own values.

    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
    
  5. Point the site at Bedrock. Update /home/sftpuser/apps/{{ container name }}/wordpress/cloudpress.yml:

    site:
      webroot: html/bedrock/web
      wordpress:
        template: roots-bedrock
        path: html/bedrock
    
  6. Restart the site. In the dashboard, open the site's Settings and use Restart.

Users, plugins and themes from the new site appear in the dashboard within about 10 minutes. Wait for them before you install or manage plugins from the dashboard.