I’ve got a fully developed web app but i can’t figure out how to deploy it!
I’ve been messing about with .htaccess files and various directory structures all day but i can’t make it work.
Can’t quite believe it to be honest. Didn’t expect it to be such a vast hurdle!
I thought maybe i could just put the webroot folder and the root index and htaccess files in the public_html folder. Then put the rest of the application in an “app” folder in the “/home/username”. And then use htaccess rules to direct everything.
Would really appreciate some advice here as i am lost and the docs aren’t too clear on this.
Although there is a docs page with deployment recommendations, for your app to simply run on your remote server you don’t have to do anything other than to put the correct db connection data inside your app.php.
So yeah, you definitely shouldn’t have to do anything with the .htaccess files or anything else, really.
Simply determine which directory is public (don’t know what it is for hostgator) and put all CakePHP files inside of it (app, lib, etc.). If your db is connected properly, your site should work immediately.
One possible pitfall: Make sure that you don’t have any cache files in your tmp folders when you upload them to the server, as it can cause errors otherwise.
You have to upload all that in your home/public_html folder (or in a subfolder). and nothing else! (if you put inside the html_folder, everything else should be in the webroot subfolder)
If you want to do the “app” folder inside home, you have to edit these files