Pointing Bedrock Wordpress website to current release folder after deploying with Capistrano

Hello.

I’m using Bedrock folder structure for managing Wordrpess and Capistrano for deploying from local to staging and production environment.

How to configure Bedrock to serve Wordpress from current folder (current release)

Hosting serves the production from domain.com folder and staging from staging.domain.com folder. Capistrano deploys to staging.domain.com/current folder. Tried modifying $webroot_dir = $root_dir . '/public_html' to $webroot_dir = $root_dir . '/current/public_html' in config/applicatiton.php. However, hosting still serves the website from staging.domain.com.

Adding rewrites to .htaccess or modifying WP_HOME to be staging.domain.com/current might help, but seem bad for SEO and Speed.

Are there better ways?

You could deploy your code to /app/master & /app/staging & add a symlinks from /public_html to /app/master/current/www & from /staging.domain.com to /app/staging/current/www

This topic was automatically closed after 42 days. New replies are no longer allowed.