RUn the commands
Run the commands
node_modules\.bin\encore production
composer install –no-dev –optimize-autoloader
composer dump-autoload –optimize –no-dev –classmap-authoritative
File Structure
- build paste from public/build
- bundles paste from public/bundles
- index.php
- .htaccess
- symfony
- config
- public
- src
- templates
- translations
- var (empty content)
- vendor
- .env
- composer.json
.htaccess
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php [QSA,L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 302 ^/$ /index.php/
</IfModule>
</IfModule>
Edit index.php
require __DIR__.’/symfony/config/bootstrap.php’;
Edit config/services.yaml
parameters:
APP_ENV: “prod”
env(DATABASE_URL): “mysql://user:pw@127.0.0.1:3306/dbname”
More details https://medium.com/@runawaycoin/deploying-symfony-4-application-to-shared-hosting-with-just-ftp-access-e65d2c5e0e3d