Deploy Bedrock + Sage to VPS hosting multiple websites

Hi there,

I recently started using trellis as my local development environment. I have developed a wordpress website for a client, which will be hosted on a FastComet VPS server, that is already hosting multiple websites.

I have added an addon domain pointing to /public_html/new-website/ as document root, and edited the .env file in the folder. I am still getting internal server errors. Does anyone have any experience setting up an environment like this?

Thanks in advance!

Bedrock sets the web root a level deep in its web directory. Is your setup reflecting this?

Im not entirely sure what you mean by this. Where in my setup should this be?
It’s unclear to me wether I should be doing this all through Trellis, or manual deployment via git, since I want this website to be uploaded in a subfolder of the public_html folder

You need to have the addon domain point to /public_html/new-website/web (where new-website is a Bedrock project), since Bedrock’s document root (aka web root) is the web directory. Here’s a full explanation of Bedrock’s folder structure:

You don’t need Trellis to deploy Bedrock, but it is nice, however, you’d need to modify Trellis to use it with your existing setup.

Thanks for the reply!

I’ve set up the web folder as the document root, and after adding the .htaccess the frontend is working.

However, when I try to access the admin, i get redirected to /wp/wp-admin, which gives a 404 page. Do you know how to solve this?

Its fixed! If anybody ever faces the same problem, this were the steps I took:

  1. Created an addon domain pointing to the /web folder.

  2. Created the following .htaccess file, also located in the /web folder:

     <IfModule mod_rewrite.c>
     RewriteEngine on
     RewriteCond %{HTTP_HOST} ^(www.)?{{HOME_URL}}$
     RewriteCond %{REQUEST_URI} !^/wp/
     RewriteCond %{REQUEST_FILENAME} !-f
     RewriteCond %{REQUEST_FILENAME} !-d
     RewriteRule ^(.*)$ /wp/$1
     RewriteCond %{HTTP_HOST} ^(www.)?{{HOME_URL}}$
     RewriteRule ^(/)?$ wp/index.php [L] 

(Replace {{HOME_URL}} with

The admin section should now be available, if the pages arent displaying, save the permalink settings from admin.

1 Like