Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy a PHP project from Git to a server that does not have Git installed

I need to find a method of deploying a PHP project stored in a git repo to a staging and production server that do not have git installed. Scripts I've found so far (ie Capistrano) require Git on the target server.

Unfortunately, my host does not allow this, and the only way so far is via standard FTP, with which I keep missing files. This makes for an unprofessional look.

I would like to be able to deploy from my local git repo, which will check the .git folder on the target to see which version is on there, then cause the target server to backup the current version and then overwrite it with only the changed files being pushed.

Preferably something in PHP with a web interface.

Not asking much am I ;)

Anyone out there got/seen anything like this?

like image 346
designermonkey Avatar asked Feb 21 '11 19:02

designermonkey


People also ask

Can I deploy PHP project on GitHub?

Upload SSH Key To GitHub RepositoryOn Github, navigate to the repository and find the code which you want to deploy. If you are using another Git service, you will have to find the equivalent way of deploying them. Go to Settings -> Deploy keys and click on the Add Deploy Key button to add the SSH key.

How do I deploy a PHP site to GitHub?

Choose a deployment method Click “GitHub” in the deployment method. Next, type the name of your project repository. Ours is called is crud-php-mysql . Click the “Connect” button.


2 Answers

There are three git-ftp scripts which allow you to "push" a git repository to a FTP server.

  • git-ftp (bash)
  • git-ftp (python)
  • PHPloy (php)
like image 150
Boris Guéry Avatar answered Sep 24 '22 22:09

Boris Guéry


You might be able to use something like Fuse to "mount" the production server as a local drive, and then as far as your copy of git is concerned it's a local operation. Alternatively, rsync.

like image 22
Tyler Eaves Avatar answered Sep 23 '22 22:09

Tyler Eaves