Symfony 5 deployment issues (showing empty page)

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.

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *