Moving your Symfony project to production web sever

This tutorial assumes that you have already installed symfony on your hosting account.

Make sure you have all the production parameters entered in /myproject/config/databases.yml and /myproject/config/properties.ini. The last file is needed for Symfony's sync command.

rSync everything from your development environment to your production server with Symfony built-in sync production command.

symfony sync production go

Optionally if you wish to make changes to php.ini file you can copy it to your myproject/web directory.

cp /usr/local/Zend/etc/php.ini /home/user/myproject/web/php.ini

If you do copy php.ini be sure to add


to your myproject/config/rsync_exclude.txt file and to change file permissions to prevent access to it:

chmod 600 ~/myproject/web/php.ini

After synchronization add myproject/config/config.php to myproject/config/rsync_exclude.txt file


Edit the myproject/config/config.php file on the server to match the actual path to Symfony installation.

Edit /myproject/symfony file on the server. You need this to have access to Symfony's command line interface. Change the first line to match the actual path to your php5 binaries. For example change

#!/usr/bin/env php


#!/usr/bin/env /usr/local/php5/bin/php5

Add symfony file to /myproject/config/rsync_exclude.txt.


You can use symfony command like so

./symfony cc

To use web debug toolbar you need to symlink the symfony/web/sf directory from you /myproject/web directory.

ln -s /home/user/pear/share/pear/data/symfony/web/sf sf

Now you project can be accessed on your production server.


© 2003 — 2017 Akinas
Все права защищены