So I’ve been asked how I got this blog installed when I was running a rails app on my site since the blog directory gets made in /railsapp/public/blog. Well it was pretty simple, here’s how:
Log in to your control panel. Should be http://[domain]/cpanel
Create a subdomain by clicking on the “Subdomains” icon.
This will show your current subdomains. Enter “blog” in the text box and pick your domain. It defaults to your RailsPlayground domain. Click Add.
(I can’t remember if it asks where to create the root directory, if it does leave it at the default of railsapp/public/blog)
This takes a few seconds to minutes but will let you know when the subdomain has been created. When it’s done go back to your cpanel home page.
Now scroll down to the bottom and on the right there will be an icon of a blue smiley face labeled “Fantastico”. Click this.
This is a listing of scripts that you can install for your site. Find WordPress under blogs on the left and click the link. This will open a description on the right. Click on “New Installation”
This will ask you where to install it. Select the subdomain you created above and it should default to your subdomain folder (Which is going to be /railsapp/public/, in our case “blog”)
It will then ask for an admin user/password combo. And then let you know that it is done installing.
Now, open up your favorite ssh app and log into your site. If you get a message telling you the shell is disabled, contact support with your railsplayground domain name and they’ll set it up for you.
Now cd railsapp/public and with your favorite *nix editor open .htaccess. I use Vi, so you know that’s there at least.
Theres a section commented out that says something like “use the following so Apache won’t rewrite requests”, under that there is a commented out RewriteCond and RewriteRule. Uncomment these by removing the #
Change those two to this:
RewriteCond %{HTTP_HOST} ^blog.$ [NC] RewriteRule .* - [L]
This will tell Apache to not rewrite any requests that look like blog.[your domain]. You might want to scroll down and change dispatch.cgi to dispatch.fcgi while you’re in here if you haven’t already.
You should now be able to hit blog.[your domain] and see the WordPress home page