PHPloy is a little PHP script that allows you to deploy files through FTP to a server. It makes use of Git to know which files it should upload and which one it should delete. It is a real time-saver. PHPloy supports deployments of submodules and sub-submodules.
- Drop
phployinto/usr/local/binand make it executable by runningsudo chmod +x phploy. - Create the
deploy.inifile. - Run
phployin terminal.
- Drop
phployinto your project. - Create the
deploy.inifile. - Run
php phployin terminal.
The deploy.ini file hold your credentials and it must be in the root directory of your project.
; Deploy Settings
[Production]
skip = false
user = example
pass = password
host = example.com
port = 21
path = /path/to/installation
passive = true
; If that seemed too long for you, you can specify servers like this:
[ftp://example:password@example.com:21/path/to/installation]
The first time it's executed, PHPloy will assume that your deployment server is empty, and will upload all the files of your project.
PHPloy ignores everything that Git ignores. But if you have files that you don't want uploaded to your server but Git is tracking them, you can ignore them by adding the following to your deploy.ini file:
ignore_files[] = file/toignore.txt
ignore_files[] = another/file/toignore.php
And PHPloy will ignore those files.
PHPloy stores a file called .revision on your server. This file contains the hash of the commit that you have deployed to that server. When you run phploy, it downloads that file and compares the commit reference in it with the commit you are trying to deploy to find out which files to upload.
PHPloy also stores a .revision file for each submodule in your repository.
##Contribute
If you've got any suggestions, questions, or anything else about PHPloy, you should create an issue here.
PHPloy is developed by Baki Goxhaj, a freelance WordPress and Laravel developer from Albania. It is based on the work of Bruno De Barros. This project was taken furtheer because the original project did not suport Git Submodues.