Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

avieln's avatar

Development Workflow

Hey, i am trying to look for the best workflow for development of my site. we are 2 developers who work on the same website. untill now we were working directly on our digital ocean droplet. but now, we have a first version running, and want to work on a development version. we dont want to work locally, but rather on the cloud. we also have a cloud 9 account and server.

the option i think about is creating another project on the droplet and just work on that, and copy to the public folder when done.. this is a problem because if i configure my nginx server to listen on another port, when i try to access facebook API the url is not recognized.

what do you think?

0 likes
17 replies
bashy's avatar

Why not work locally and use Homestead? Work on different parts or keep up to date about commits so you can sync your repo. Are you using git already or not?

avieln's avatar

we dont want to work on homestead. i have 2-3 pc i am working from, and it not possible to install homestead on them. i am not using git since it's all happenning on the same server

avieln's avatar

we are using cloud 9 ide, so we can SSH into the server and code directly on it

bashy's avatar

I have 2 that I have Homestead on. What's the issue with yours? You can use git locally or on the same server. It doesn't have to be remote by the way.

You asked about working in a team and that's how a lot of people do it :)

2 likes
zachleigh's avatar

I would definitely start using git. How exactly are you two developing now?

avieln's avatar

yes i know, but the problem here is not working as a team, but rather have an online testing environment, which can be copied into a production environment. i want to have 2 "sites". one public, and one for us to test things on, which is just a development branch.

when you use homestead, how do you keep your DB synced with the one online? and how can you use facebook graph API?

avieln's avatar

we use cloud 9 ide, which allows ssh to the server, and we can see online what each of us is doing, like google docs or something. it VERY convieint. but again, what's the best way to keep a development site with same DB that can be pushed easily to the production site?

bashy's avatar

You mean a staging deployment? Don't really understand your workflow but I think you use the live database to develop on?

zachleigh's avatar

Do you want a locadev branch or a live one on your server? I think what you want is git...

andy's avatar

Do you guys do some kind of team coding? Where one talks and the other types? That's what I think Cloud 9 is to help with.

There are lots of people here who have worked big firms and have done team work and I'd listen to them. Both @bashy and @zachleigh are trying to help.

From me:

  1. Start using Git
  2. IF you are using a live Database : STOP! That is like waiting for a train wreck to happen. However, I have a feeling you are dumping your data daily, am I right?
  3. Start using Git. Once you do, you'll start to see lots of ways that you can make your development better.
  4. If you are not doing team-coding then git will provide the same amount of comfort of knowing who did what.
braxton's avatar

My recommendations for a workflow:

  1. Setup Homestead. It will allow you to work on a server that will be almost exactly the same as your production server.
  2. Set up Git/a Github repository. This is a very easy to work with VCS, and even though you are giving up seeing live what the other person is doing, it is some great software to use while developing projects across teams, and you will know who did what exactly.
  3. Do not use a live database for your projects. Use seperate ones. This keeps from mistakes happening. If you are trying to implement a feature on the test server, and you mess up a different row/table, that would result in an outage/error codes on the production server, and you do not want that. If what you ar etrying to go for is user data to test with, use a library called Faker( https://github.com/fzaninotto/Faker ).
aviel_n's avatar

@braxton , @bashy @andy @zachleigh - Thanks All for you help!

i agree i have to use git. but my main issues that i'm not sure how to solve are (maybe you can help):

  1. authentication - my website is using only facebook login, and takes friends list from facebook etc, how can i keep using this even on my development branch? (if it is locally, i wont have a ip to register my app with on facebook site). 2.database : while user DB is easy to fake, the website has tables for shopping items, which we update manually, so if we update it on the development side, we need to push it to the live mysql, can this be done?\
  2. can i use my own server as a git repository, rather then paying for another host for git?

thanks a lot:)

sutherland's avatar

Glad you see Git is the way to go, it has huge advantages even for a one person team.

Auth: Most API's know that developers are going to work locally at some point, so they should have a way to make it happen. Here's a discussion about doing it with Facebook.

Database: Model Factories make it super easier to insert some dummy data while you're developing. I don't recommend copying data directly from your dev environment into your live production site (speaking from experience - you're bound to mess something up). Laravel makes setting up some simple CRUD operations really easy, so it's worth spending a little bit of extra time to build a proper dashboard for adding shopping items.

Git: You can set up your own central repository for the two of you to push/pull commits to/from, but Github will save you a few headaches and has a great web interface that comes in handy. Worth the $7 in my opinion. I also highly recommend trying out Envoyer for deploying your code to your server.

zachleigh's avatar

You can also use Bitbucket if you want a free private repository.

andy's avatar

If you're more adventurous you can set up Gitlab which would be hosted on your own server. I work with git and gitlab.

aviel_n's avatar

great! thanks! so i can install gitLab on my server, and use it as a source managment? i can also do it with only git, right?

Please or to participate in this conversation.