This is my first deployment in Symfony 5 and I've been struggling a couple days with deployment because my website is showing a blank page. I'm using Infinity Free Web Hosting with:
- PHP Version 7.3.6
- Apache
- My website doesn't have a db.
So before I start to upload files with FileZilla, I run this commands:
SET APP_ENV=prod
composer install --no-dev --optimize-autoloader
composer dump-autoload --optimize --no-dev --classmap-authoritative
My folder structure goes like this
- htdocs
- \css
- \downloads
- \images
- \scripts
- .env.local
- .htaccess
- index.php
- \symfony
- \bin
- \config
- \src
- \templates
- \translations
- \vendor
- \var
- composer.json
And modified index.php with new path:
require dirname(__DIR__).'symfony/vendor/autoload.php';
The issue is that the page is showing completely blank (not even an error). What is my mistake? I've been following instructions with this tutorial, create a "symfony" folder with bin, config, src, templates and vendor, and I copied my "public" folder content to /htdocs folder. Hosting provider doesn't allow me to upload content at the server root folder. Thanks in advance.
SET APP_ENV=prod, usedevif you want to see helpful error messages.