-2

i created my first symfony App. It works on build in web server on a localhost. Then i copied all files to FTP but since that moment i have no idea what to do to make it run.

I read http://symfony.com/doc/current/cookbook/deployment/

Tried to configure http://deployer.org/ and Capistrano but its very hard for me to understand how should i make it going.

If someone could explain me steps to make my Symfony3 App Run.

hamzo
  • 195
  • 4
  • 14

1 Answers1

5

I'm freshly after installing symfony app to the production server, and hope my experience will help you.

Instalation

The most basic installation consist of few points (just ordinary way):

1. Copy symfony project to production server.

2. Composer install:

$ composer install --no-dev --optimize-autoloader

It modifies autoloader to fit the new environment and make all the magic under the hood.

Tip: Start in shell with "export SYMFONY_ENV=prod" before to avert errors.

3. Clear and warm-up cache:

$ php app/console cache:clear --env=prod --no-debug

It already works but under "/web" directory which is probably not what you want.

4. Change the web server's document root (for example), and point it to "/web".

End words

I'm keeping it straightforward, here are the sources:

Community
  • 1
  • 1
Xarvalus
  • 2,873
  • 1
  • 19
  • 29
  • Why down vote? As I said, the intend was to keep it straightforward as possible in order to be easy to understand. At least inform what you are concerned about, thanks. – Xarvalus May 11 '16 at 00:22
  • Thank you for your help but im still getting error 500. I managed to run it in dev mode but i cant run prod mode. – hamzo May 23 '16 at 13:47
  • 1
    It might be tricky, you need to investigate "**prod.log**" file and "**error_log**" (one from Symfony, second from PHP). Without the error message I cannot help you, but you may always post in on StackOverflow if you are not sure what to do. – Xarvalus Jul 09 '16 at 07:29