how to use Bamboo for PHP application

Hello Support Team,

I have PHP application and need to deploy on server using  Bamboo. I have configured plan but not able to find which tasks will helpful for PHP application deployment. Major tasks are related to Java projects only.

Can you please provide steps for do it or if any video you can provide it then will be really help for me and my team.






2 answers

0 votes
Gonchik Tsymzhitov Community Champion Dec 17, 2017

Hi Sunil, 


You can use SSH tasks for your deployment plans


or if you want to use PHPUnit let's follow this instruction 



Hope it helps.



Gonchik Tsymzhitov

Thanks Gonchik for quick reply.

In my application I don't need to run PHPunit. 

Just need to deploy PHP modified files on server. In PHP, no files are compile, just need to deploy only. Please help I am not able to find any solution for it?

Please provide steps or any video tutorial.



Gonchik Tsymzhitov Community Champion Dec 17, 2017



Well, your php code in vcs/cvs system?

If it is, let's try to use integration like trigger from bitbucket after commit, then run plan with git pull task and if you need additionaly command let's use terminal commands - "Command".





Gonchik Tsymzhitov

Like 1 person likes this


Below is scenario for PHP application.

1) I have code which is in git repository.

2) But on live site/server there is no repository due to some firewall/vpn restriction.

3) Now after modified files I am committing file on Git and also manually upload modified file on live server via Filezilla.

4) Question is is there any way in Bamboo, where I can commit my code from local and these all modified files will store into particular place where any developer can deploy modified files on live server using Filezilla, In case of my absent.


Please provide details with steps thanks,

Gonchik Tsymzhitov Community Champion Dec 17, 2017


Ok, as I understand your have to live server a some connect via ftp/scp. 


If I were you, I will setup staging server in development network. 

1. This server will be updated from git repo. Has some different configs although live server.

2. Bamboo Plan will include 3 tasks.

2.1. Pull master repo on staging server

2.2. Second task is some smoke test, like "curl", parse result. 

2.3. Main task is rsync files to live server.Tasks will base command "SSH task". I have provided you early a doc.

like this "rsync -Pav --exclude config.php --exclude 'admin/config/*' staging/"

3. Let's share this plan to developers.




Gonchik Tsymzhitov

Like 1 person likes this

Thanks Gonchik for above answer.

based on your answer, I need to do following steps.


1) Add Bamboo task for checkout from git.

2) Add Bamboo SSH task and add live credential into it. 

3) After that execute plan.

Is it correct?


Some where I found below points for PHP application.


I would suggest to create ZIP Artifact, upload it to your server and unzip it.

Step 1: Add new task to your default job - "Script", and inside body add a zip command to create zip file out of your code.

Step 2: Go to Artifacts tab, and define your artifact. Make sure to Share this artifact.

Step 3: Add new tasks to your Deploy - first Artifact download, and select your new created artifact.

Step 4: Add new task - SCP task. It will allow you to copy your zip file to your server. Specify your server credentials and remote path.

Step 5: Add new task - SSH task. Add a simple unzip command to unpack your files.

I got from below URL:


Can you please let me know which is correct?












Gonchik Tsymzhitov Community Champion Dec 18, 2017


Yes, looks like it is correct. 

But could you use tar.gz or use chown for unziped files? 


Because after extract data you will loose file  permissions.



Gonchik Tsymzhitov

Like 1 person likes this

Thanks Gonchik for your help.

Hi Gonchik,

I have one more query.

Below is the Scenarios:

1) I have modified 2 files for required changes.

2) Commit to git.

3) Now I need only two files which I modify only. Currently in Bamboo, all files are converting into zip file. Is there any way for get only those files which I modify/commit. Something can we do by Patch command but not sure.


Currently I have added Script task into plan and added below command into body.

zip -r PHP

Can you please help me for in Bamboo which task I need to add into Plan and how to create modified zip files only?





Any reply on it please?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Wednesday in Opsgenie

Getting the Most out of Atlassian and Opsgenie Together

We’re excited to invite you to this action-packed webinar where we will demonstrate how to integrate Opsgenie’s powerful alerting and on-call management tools with your entire Atlassian stack. Mar...

48 views 0 0
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you