Houston PHP Users Group Message Board › synchronize two versions of a website
|A former member|
Symfony offers shorthand commands to synchronize two versions of a website. These commands are mostly used to deploy a website from a development server to a final host, connected to the Internet.
Freezing a Project for FTP Transfer
The most common way to deploy a project to production is to transfer all its files by FTP (or SFTP). However, symfony projects use the symfony libraries, and unless you develop in a sandbox (which is not recommended), or if the symfony lib/ and data/ directories are linked by svn:externals, these libraries are not in the project directory. Whether you use a PEAR installation or symbolic links, reproducing the same file structure in production can be time-consuming and tricky.
That's why symfony provides a utility to "freeze" a project--to copy all the necessary symfony libraries into the project data/, lib/, and web/ directories. The project then becomes a kind of sandbox, an independent, stand-alone application.
> symfony freeze
Once a project is frozen, you can transfer the project directory into production, and it will work without any need for PEAR, symbolic links, or whatever else.
Various frozen projects can work on the same server with different versions of symfony without any problems.
To revert a project to its initial state, use the unfreeze task. It erases the data/symfony/, lib/symfony/, and web/sf/ directories.
> symfony unfreeze
Note that if you had symbolic links to a symfony installation prior to the freeze, symfony will remember them and re-create the symbolic links in the original location.