Developing a Live Site (Locally, ideal setup)

Evening Everyone,

Not sure if this is best place for this, but here goes.

So at the moment I have a live website which is running on WordPress and uses a theme from ThemeForest. I want to make some changes to the website, and develop this accordingly, I would like to develop both on my laptop at home and on my desktop at the office.

However, I’d like to the developments away from the live website and then push the updates from the development site to the live site via Git, if possible.

What would I need to achieve this? Do I need to setup a seperate hosting account for this?

Any help would be great.

Cheers

Rob

You can easily set up a local development with Laragon (Better than XAMPP)

Nice recommendation

Ok, how would this work, if I wanted to develop the website from 2 different locations, as I say work and home? :-).

After your done on Machine A, push the changes to your repo, then pull from the repo on machine B to update those files. Another option is to store the Project on a NAS and just access that from any machine/device.

Or a USB stick? :stuck_out_tongue:

Yes, you could do that as well. The problem you may run into is if you forget to take it with you.

Another possibility is to install Linux on the desktop and laptop with a mirror image of the site.

As long as we are doing possibility’s, you could get a portable external hard drive. There are a number of ways you could handle this.

Whatever you do though, make sure that development gets as close to production as possible. Running Apache in production? Run that in development as well. Running Nginx in production instead? Then run Nginx in development as well.

Running PHP 7.2 in production? Then run PHP 7.2 in development as well. A lower version would be ok-ish (even though you won’t be able to enjoy new features), but running a higher version than in production is a recipe for disaster, as some constructs will work in development but fail once they go to production.

I personally prefer virtual machines for development (also on a linux desktop) because it’s easy to destroy and create a new one when you mess something up too much (this ties nicely with pets vs cattle).

Docker may work as well, but has a steeper learning curve and doesn’t make much sense if production is not running on Docker too.

2 Likes