1

I have been developing my website directly on my live server for the past couple of months, and now it is starting to gain a lot of traction.

I want to completely move my server files to a local environment so I can work on an identical set up locally and just transfer my changes to live when I'm done. I have no idea where to even begin with this!

Any help with how to do this would be greatly appreciated.

Edit: My website is using PHP and Laravel 5

3
  • I would suggest to have a look at git, then search a webhoster that provides you with the ability to have test-environments and some deployment mechanism that involves a git-repository that you can push to. Commented Dec 6, 2016 at 23:09
  • What are you using to build your site? Static HTML, PHP, ASP.NET?
    – rclocher3
    Commented Dec 6, 2016 at 23:12
  • @rclocher3 I am using PHP and Laravel 5
    – bendouglas
    Commented Dec 6, 2016 at 23:20

1 Answer 1

1

I'd recommend using version control. Basically you'll want to create a git repository for your project and use git in conjunction with a hosting service like www.github.com (bitbucket.org, and gitlab.com are a popular alternatives). Once you get your project setup in a git repository you'll be able to pull a copy down to your development environment, work on it locally (to avoid making breaking changes to the live website), and then when you've completed a change / feature you can test and push it to the live site.

Here is a tutorial on how to add an existing project to github: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/

5
  • 1
    let me mention www.gitlab.com just for completeness (and its open source / open core) Commented Dec 6, 2016 at 23:40
  • But when I pull it down from git how do I run it locally?
    – bendouglas
    Commented Dec 6, 2016 at 23:45
  • How you setup your local development environment is up to you. A common way to develop laravel projects locally is to use homestead / vagrant: laravel.com/docs/5.3/homestead
    – kjones
    Commented Dec 6, 2016 at 23:59
  • Alternatively if you use Ubuntu or any other linux distro for your local operating system you can setup a LAMP stack on your local machine and do it that way. Choice of development environment is very subjective and there are many ways to do it
    – kjones
    Commented Dec 7, 2016 at 0:01
  • 1
    Good idea @Phillip-ZyanKLee-Stockmann, i've added it to the answer
    – kjones
    Commented Dec 7, 2016 at 0:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .