Roots Discourse

Bedrock with Capistrano on Hostgator

Hi,

I’ve been trying to convert my existing WP website hosted on hostgator into a bedrock setup. I got it to work locally, and I have been able to set up the deployment part as well, but I’m not getting the desired behaviour on my server. I’m a little out of my depth here, so I’ll try and describe the situation the best. I’ll replace my domain with example. com.

For reference, I followed the steps on this: https://cfxdesign.com/deploy-wordpress-with-capistrano-on-bluehost/

[Note: Introducing spaces in domain name, because it won’t let me create the topic]

On my hostgator server, I now have:

  1. in the public_html, there are 3 folders, namely example .com, staging. example. com, and cgi-bin(I don’t know how I got this)
  2. In example.dev, I have the files from deployment. I have added a .htaccess file here, which contains

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?example. com$
RewriteCond %{REQUEST_URI} !^/current/web/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /current/web/$1
RewriteCond %{HTTP_HOST} ^(www.)?example. com$
RewriteRule ^(/)?$ current/web/index.php [L]

  1. In ~/public_html/example.com/shared/web, I have another .htaccess with

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

  1. This server used to contain the files from my previously hosted WP website, those files have been set aside for now. On cPanel, I have the database, in which I edited the wp_options.siteurl according to the guide.

Right now, when I try to access example. com, I just get a directory index of the three folders there, one of which is example. com. And if I click on it, it takes me to a bare bones version of my front page with some parts visible, and a hanging 404 error somewhere. Any other links on my page don’t work, and I’m also not able to see wp-admin.

So yeah, that’s where I’m at. If anyone has any idea what this could be, I can definitely share more details if you ask me. Thanks!