So you want to start your own business?

Let me stop you right there. This avenue isn't for everyone.
There's a lot of hard work, long hours, and probably more stress than you can imagine.

Everyone's reasoning and goals are different, but I couldn't morally let people go ahead without some warning.

But I don't want to dump all over people's dreams (as some did for me).
Let me go through what I did to get started.

A brief history

My story began ages since, in a time almost lost to history.

I've been through a lot in the years I've been working for myself. To be honest, I cannot remember the year from the top of my head, but I've had enough ups and downs and different stages of "working for myself" that it does feel like a few distinct lifetimes.

All I remember that in my early 20's I wanted to work for myself. I wanted the freedom and flexibility to work when I wanted, and not for the sake of money.

If there was something that I needed to do, such as some DIY, some shopping, or just to have some time to relax, I didn't want the pressure of sitting for 2 hours in rush-hour traffic per day and end up spending roughly £10-20 at Starbucks per week just so that I wasn't late for work (and that's precisely what I did).
Ultimately, I needed super flexi-time.

I've had a few jobs over the years. I've been a warehouse worker, an intern, bar staff, head of finance, and ultimately ending in web development, so I like to think I have a range of experience.

Perhaps that has helped me hone my skills in order to run my own web development business. I'm good at it, I enjoy it, and I like making my clients happy.

I left my last employment with a sigh of relief. It wasn't a horrible place to work in by any stretch of the imagination, I actually learned quite a lot and valued my time there, but having that freedom and that push to actually pursue my dreams was literally a breath of fresh air.

To begin with...

Story time is over, let's get down to some practicalities.

This is from my own experience, "going it alone", and within the UK.
Things have also changed a fair amount (hello IR35), so please do your own research into what to do. I just hope this helps point you in the right direction.

Okay, so if you're operating within the UK, you need to get yourself sorted out with HMRC.
There are multiple options available (all make you "self employed"):

For once, the GOV website came in handy for me to explain what each is (see more here), but the gist is...

Sole Trader

You work for yourself, however you please. You find work to do, and invoice for it. All the money is yours, and all the responsibility.
All you have to worry about is the Self Assessment each year.

Read more at: https://www.gov.uk/set-up-sole-trader

Partnership

Similar to a Sole Trader, a Partnership is basically saying "I'm working with this entity". I say "entity" because it could be a person, or a company, or multiples of each.
Each partner files their own taxes, etc., like a Sole Trader, but the responsibilities are shared between.

More info: https://www.gov.uk/set-up-sole-trader

Limited Company

Okay, now we're serious.

This is requires the most work, due to the level of admin (Registration, Accounts, Tax Returns, Confirmation Statement).
Even after doing this for years and having a good system in place, I am always anxious about it.

That being said, there really isn't much change to how your business will operate. You still need to win clients, get work, and be paid. However, it did come with some perks for me.

Being a Limited Company does offer some protections, and advantages.

When I first started out contracting, for whatever reason, I had to operate as a Limited Company, or under an Umbrella Company.
I'm assuming for taxes and stuff, but I didn't get into freelancing for someone else to take a percentage of my pay, so I moved from being a Sole Trader to a Limited Company.

It costs £12 to set up a Limited Company, but it isn't so straight forward. Luckily there are agents and other methods out there to do this for you, if you've got the money.

Some light reading: https://www.gov.uk/limited-company-formation

Keeping Your Accounts

Okay, "accounts" basically means bookkeeping or dealing with money.
So you need to keep track of everything coming in and going out, and making sure they all match up.

When I first started, I did this with a spreadsheet. It worked pretty well, when business was simple, but it quickly got crazy when I didn't keep it up-to-date or missed something.
Then there were the annual returns.

One thing I'd heavily recommend is a business bank account. I'm not sure if this is mandatory for Limited Companies, but for Sole Traders, you can get away with a personal bank account.

I've read some articles that banks don't like personal accounts to be used for business, but considering that having a separate account for business uses made keeping my Accounts far easier.
I wouldn't have to go through each transaction and see if it was business related or not, and I could quickly see when I "paid" myself.

The downside to using a business bank account is the cost. I've yet to see a completely free business account, but when I signed up, I got a year's free banking, so I wasn't charge, and then it moved to fee per transaction, with £5/month minimum.
It has since scrapped the minimum amount, and is just the "per transaction", which is nice now, but after years of scraping by, and on average costing less than £1/month in fees, they took a LOT from me.

However, I do get something for free from my Bank (more later), so perhaps it's paying itself off now.

You can move from bank to bank to keep the year's free banking and get the best deals, but this costs time, sometimes money, and you'd have to change all your payments terms, etc. It also looks bad ("why do you keep switching banks?")

Honestly, find a decent one and stick with it.

Book Keeping

Ah ha! Now on to the fun part (remember, I was the Head of Finance at one point).

As I mentioned earlier, I used a business bank account and spreadsheets to keep track of my accounts. This works really well to begin with, but then you run into so many issues.

Luckily, my experience helped me understand the process and know what I needed, but hiring an accountant to do this for you, or using specialist software helps a great deal.

Sure, it'll be easy to keep track of how much money you've got, but there are things like taxes and returns which need to be filed correctly, and you don't want to make things more difficult for yourself.
Trust me, I've lost countless nights stressing over this nonsense and you've got to remember those deadlines (and there are a lot if you've setup like me).

This is where FreeAgent comes in

Let me be clear, I get this software for free because of my bank, but I would heavily consider paying for it if need be (I'm a developer, so I'd be tempted to make my own).
Since I don't pay them for it, there is no incentive for me to recommend them. They do have a referral scheme, but I'm not eligible.

Honestly, they've been a life saver since I've been using them and I don't think I could ever go back.

The support is excellent and they keep adding new features to make running a business easier.
Whereas before, "doing my taxes" took several days, I can get it done in less than an hour. It's true, I recorded it in their Time Tracking system.

They've got so many great features, this whole article could be just dedicated to them. Go check them out, and tell them I sent you. Maybe they'll be nice and send me a gift.

If not FreeAgent, get some software to help you keep track. Maybe you'll be lucky and get it free from your bank too.

Final Notes

I'll end this article here. It's very rare for me to write so much, so I'm quite surprised I'm going to make this a 2-parter. Who knows, maybe even a third!

It isn't "easy street", but it is well worth it. Even as I pile more admin upon myself by growing and expanding (I know have to sort out pensions since I'm taking on employees), I don't think I could ever go back.

In the next article I'll be explaining things you may want for your business (websites, emails, software), and luckily for you, I know how these things work... so perhaps you can trust me?

Until next time.

I'm writing this a few weeks into 2021, and as a UK business, the global pandemic has been "something else".

Now, back in March 2020, I had a fairly decent stream of work coming in. However when we first went into Lockdown, the work dried up.
A good number of my clients were in hospitality, and thus, were closed. Since they were closed, and not bringing money in, the budget for work dried up.

Even recently, I've been getting emails from them about more work, looking to pick up the projects again, but we've entered another Lockdown.
To be honest, I don't think I ever left the first and I don't know what number we are even on.

It's been a hard year for a lot of us; some more so than others, and my heart earnestly goes out to those who are struggling.

However, it is a new year! A fresh start, and all that!

Luckily for the business, I was able to pivot and find clients who needed work doing who weren't massively affected by the Lockdown. This meant that I could still bring money in and grow the business.

We've got exciting things in store. Recently bringing on an intern and looking at adding another member of staff shortly.
These are all part-time jobs, mainly because the work needs to come in and these employees need to "pull their weight", but I am very optimistic about this year.

Better still, these are people who are interested in learning and are wanting a fresh start themselves (new careers, etc.), so who am I to pass up on an opportunity like that?

I've also seen other "small local businesses" do well too. Some are my clients, and others are competition (either directly, or they snatch up the talent I was looking into). And, to be honest, I am glad. If more people are achieving their goals and dreams, all the better.

I don't write this to boast. If anything, I'm only writing this because I want to blog more (see various other published and draft posts scattered around).
But if it helps get the message across that "life goes on" and we shouldn't wait until things go back to normal, then at least some good has come of it.

So, if you want to help me support others in achieving their goals...

In case anyone reading this doesn't know, I've been working with WordPress since the very early days. I've seen a lot change, what to do and what not, and I will honestly say that WordPress is not the complete solution.

It is heavily limited in so many ways, and very vulnerable in others.

It's not entirely the developers fault. This free, open source system is accessible my everyone, and no one is perfect.

Anyway, the issue isn't with WordPress. The issue is with "developers", and there are so, so, so many of them.

Third Party Developers

As a developer, I've had to fix up a lot of sites where they've been built on systems that are ultimately abandoned. I've also had to build sites using mandatory themes and plugins.

And the sheer amount of work and stress I've put into these sites, it would have been far easier and cheaper to build a system from scratch; heck, the site would run a lot smoother to begin with.

I get it, you're on a budget and money is tight, and the lure of this "all in one, magic bullet system for less than a hundred quid" is very, very tempting, but here's the thing... they are absolutely rubbish (and there are thousands of them).

Given a year, the vast majority of them won't be updated any more.
Given a year, your "developer" who you've paid thousands to will tell you to hoof it (and I've seen that happen far too frequently).
Given a year, you'll be frantically running around, trying to find someone to fix your site for you because it's falling apart at the seams.

I write this off the fact I've spent the past two months fixing sites because their previous developers left their clients in the lurch, and essentially didn't care about the work once the invoice was paid.
I write this off the fact that I've had to calm owners and managers because their site is suddenly unusable and it's their primary source of income.

2020 is bad enough.

What should you do?

The TL;DR is find someone who is trustworthy and reputable... which is a hard thing nowadays, because there's a lot of snake-oil salesmen out there.
People will try to squeeze every penny out of you, and use very under-hand tactics in order to do it.

Or they will outsource it to someone else, for a fraction of the cost they are charging you, and it will be a dumpster fire. Again, I've seen this be the case.

At the end of the day, do your research like you are going to build it yourself.
Sure, you may not have the skills or the know-how, but look into it.
As someone who has to write up proposals and manage whole projects, it makes my life so much easier talking to clients who have a basic understanding of what they want.

Don't buy cheap (hence the title of this post). You will be paying far more in the long run.

Find someone that can show you what they can do, in a variety of different ways, and especially someone who actually knows how to build things from scratch.

And question all their decisions. Why are they using this theme, those plugins, why are they building it themselves, etc.
((but, you know, in a nice way so you are able to understand and not come across as nagging))

This is your idea, your livelihood, your money that you are spending, so ultimately, you are in charge.

I honestly do aim to write blog posts more frequently. I've got a notification set for Friday, 3.30PM, every two weeks called "Blog Post", but alas, I'm not consistent with it.

I have several drafts and notes written down, but finding the actual time to write something informative and fun isn't the easiest I find. I think it comes down to inspiration and motivation.

Anywho, I want to introduce you to some new friends of mine.

The first shoal: Neon Tetra

Why am I showing you these guys? (I've tried to sex them, and I think I've got 3 pairs).

Well, in complete honesty, it's to bring some peace and relaxation to my day to day.

This past few months has been all go for me; overworked, scope creep, clients changing their minds, the usual. I'm not complaining, much, because it is nice to be productive and make my clients happy with a job well done, but I needed something to pull me away from work.

I've been listening to "Turtles and Chill" on Twitch most days. It's soothing jazz, and some cameras pointing at a tank with fish and turtles swimming around. It's a relatively pleasant community there, albeit not that talkative, so it helps fend off the loneliness from social distancing, but isn't that distracting.

Why get fish?

I've had fish before, generally cold water goldfish, and they grew massive, but I was young and they were a nightmare to care for because I didn't have the best setup for them.

This time, however, I've gone for something different; small tropical fish in a planted aquarium.

The tank, once setup, but not complete

I mean, just have a look at the tank. This wasn't quite complete (I was waiting for some clips for the heater, and it has changed a little bit since), but it already looks so calming.

Sometimes I just get lost in watching all the fish go crazy during feeding time, watch as the Harelquin's swim upstream (literally against the filter outlet flow) and see who out of the bunch is hiding away (there seems to be one out of each shoal).

It's a relaxing and easy hobby, once you've got the correct setup and do things the right way.

The Harlequin Rasboras are eager to meet!

What about a dog?

Oh, you mean this dog?

Follow Stan on Instagram!

You can't have him.

Having a dog has been great; an excuse to get out of my chair and outside for some exercise. He's the perfect fit. Daft, playful, but also sensitive and cuddly.

When he's out, he's got all the energy in the world, and when I need to work, he just curls up either on his bed or mine and goes to sleep.

My life is all the richer with him in it.

Summary

In all honesty, the only reason I am talking about my pets is simply because it takes me away from the computer. My days are usually 12+ hours in front of some form of screen.
Even when I'm not working for clients, I'm either working on my own projects, playing videogames, or chatting to friends online.

What you need is a hobby, something that takes you away from the busyness and allows you to reset; don't shirk your responsibilities, but don't run yourself into the ground either.

So, if it's going to the gym (or in my case, aikido [when we're allowed again]), walking the dog, walking yourself, aquascaping, painting miniatures, art, reading a book, whatever, take time out to do it.
I have been far more productive after a decent break/rest from the strain of work. Even a 15 minute break to make a cuppa and stare out of the window allows my brain to have a rest, and I've found whatever problem I've been smashing my head against for hours prior, I suddenly have a solution for.

Be kind to yourself.

Oh boy, now this has been truly a pain.

I was first introduced to the idea of Continuous Integrate/Continuous Deployment all the way back in 2018, and I've only just been able to create my own runner.

For context, I self-host Gitlab on a private server.
I don't use any other tools like Jenkins, or sites like DeployHQ, but instead used the feature that is provided by Gitlab. Why muddy the waters?

I've worked with agencies which do use those services, and they made things look so easy; just commit the changes to whichever branch and boom, the site is updated in a matter of minutes (depending on the size).

But there is a lot to learn about Gitlab pipelines, runners, and CI/CD.

Where to begin?

Firstly, you need to make sure that the service in enabled on your Gitlab.
I believe that it is, by default, but if you are like me and found that warning message for every project annoying ("hey, you've got this thing but it doesn't work - do something about it"), you found a way to disable it site-wide.

I believe I followed these instructions on how to enable or disable GitLab CI/CD, and opted for the project by project basis, as I also manage other non-DevOps work there.

Once that is in place, you should notice a new CI/CD menu at the side.
If it's already there, great! GitLab is rather forthcoming with their alerts and messages, so what you need to do next will be obvious.

What to do next?

So you click through and it says "create a pipeline".
This is a file which is a part of the repo; inside that is a list of instructions for the runner to carry out once certain conditions are met.

So you can set some instructions for the Master branch, Production branch, developer branches, or branches with certain tags, etc.
And the commands, can range from SSH commands, run scripts, grab variables, and probably a lot more (I've only needed the most simple tasks).

Essentially, all my runners do is check if their branch is updated, and copy the files to whichever server they need to go. This makes it easier for me, because I have a separate machine to do all the "sitting and waiting" instead of my computer (which I need to use to work).
There are more rules to it than that, such as backups, file permissions, etc., but it is to automate the process.

What is this "Runner"?

Right, yes, runners.
A runner is a service that acts as a user for you. Think of it like a computerised servant, a robot butler (hey, "Jenkins"), that will casually wait around, checking on their repos, and once something happens, they will read through the list of instructions and carry them out.

Why hire someone to do that when you can build a machine to do it for you.

It is recommended that you have a separate machine to do this for you (it doesn't take a lot of processing power), but if you want to use the same server that the repo is on, or even your own computers, you can too.
You just need to make sure you turn on the runners/activate the service.

I found these instructions on installing a GitLab Runner worked well, although I found issues with getting it to work on Windows and Powershell.
So I used Ubuntu (I am quite familiar with Linux now... I think I actually prefer it).

Here's a bit of free advice, make sure you give the appropriate permissions to the machines you use.
I was stuck for such a long time, because I didn't think about the SSH Keys.

Creating the YAML file

This is the list of instructions I mentioned earlier.

For me, I simply wrote what I usually do when deploying a site down.
Some transposing is needed (it's not quite so straight forward), and there are certain rules you need.

There are quite a few tutorials and guides out there, and with a great amount of luck, I found that this offers the basics for what I need (if you've got any suggestions, please, let me know).
Oh, in the example below, I use GitLab variables to store the keys I need to access remotely. I used ssh-keyscan as a command to find the keys (if you don't have them saved elsewhere).

# What stages we have (think of this like tasks)
stages:
  deploy

# The job name (can have multiple)
deploy_staging:
  # What task we want to do
  stage: deploy

  # The things we actually want to do (aka list of instructions)
  script:
   # Adds the SSH Keys to Remote so we can access via the Runner
   - eval $(ssh-agent -s)
   - echo "$SSH_REPO_KEY" | tr -d '\r' | ssh-add - > /dev/null
   - mkdir -p ~/.ssh && touch ~/.ssh/known_hosts
   - echo "$SSH_KNOWN_STAGING" >> ~/.ssh/known_hosts
   - chmod 644 ~/.ssh/known_hosts

  # SSH Commands, can have multiple, and different commands
   - ssh -p[port number] [user]@[ip] "[the command you would normally use manually]"

  # Only run on this branch, tag, etc.
  only:
   - [branch]

And that is about it.
You can add so many more tasks, jobs, instructions, all sorts. I would only recommend in keeping it simple as it does use processing power for the Runner and Remote; you can run out of RAM.

If you've got any questions, suggestions, or just want to chat, you can email me using the form below, or find me on Twitter (I'm usually hanging out there).

As of writing this, we're mid-way through week 3 (week 3.5, if you will) of the UK Lockdown, and I have to say, it feels a whole lot longer.

But that's besides the point. A lot of people are feeling the pressure, a lot of businesses are. People have lost their jobs, work has slowed down significantly and people are adjusting to the "new norm".
I've always worked from home, not much has changed in that aspect, but it is difficult to see people struggling in these times, whether it be friends, family, my clients or just strangers on the street.

It doesn't help that people are treating this like an extended holiday.

What's the point I'm trying to make

Yes... sorry, my mind started to wander.

Essentially, it's important to be productive.
Perhaps there are some DIY or home improvements you've been wanting to do, perhaps it's time for a spring clean (trust me, it is rewarding to be able to clear the clutter and sit down in a fresh, clean, tidy home), or (hear me out) it's time to start working out, or even try your hand at a new/favourite hobby (cooking, baking, reading, etc.).

I've had a few projects which I've been working on, and since I've had more "free time" lately, I've been picking those back up.

One of which is Distraction Tactics.

Distraction Tactics is a small "indie" game development studio which focuses on working with freelancers and self-employed people in order to come together and make games.
There are a few games in development right now, and the outlook is optimistic on these.

This project really was a delight to work on. I learnt a lot by working on the site, and I think I am actually proud of it (which is a rarity for me, being a perfectionist).

The funny/annoying thing is that whilst finishing up the site (and I mean literally, as I was about to hit "deploy"), I had a bold, new idea... "why don't I used CSS Grid for this problem I faced? Why don't I rebuild the site with CSS Grid?"

No. Just no. Don't ever do this, because you'll get stuck in an endless cycle and nothing will ever get finished.
If it works, great, stick to it, and use your new idea for the next project.

Anyway, please go check out the site (I'll be adding it to the portfolio at some point), and constructive feedback is welcome.

And as per usual, shameless plug below.

I've been having loads of issues with my internet of late.

After an OS update, I suddenly was unable to stream; I was dropping all the frames. The only thing that had changed was an update in my OS.
Weird, right?

Using the updating and down-dating the drivers did nothing, but I was moving away from my ISP by this point, because of their terrible customer service, and the fact that you are essentially forced to use their equipment only (which is expensive and sucks).

So I moved ISP, to somewhere "faster" and cheaper.

Certainly cheaper... and third-party friendly, but as for reliable, no chance.
Although their supplied router actually reaches all parts of the house and doesn't randomly disconnect.

I've taken out the best possible plan they have for my area, and it's not a lot.
It's advertised as 35-50Mbps, but I am no where near that; for an entire month I was barely scratching past 20.
But "guaranteed" 31.8Mbps.

As for my upload... I'd be lucky to go over 3Mbps (despite advertised as 6-12Mbps).

Not only that, I can do one thing on the internet at any given time. Downloading a file literally obliterates any other connection, on the same machine or other device.

But what I did learn from this is that Mbps is not the same as MB/s. Both are per second but Mb is megabit and MB is megabyte. 8 bits in a byte.

So doing some tests, I was able to download a 500MB file in a few minutes, at 3.0-3.5MB/s, and that ate up my entire bandwidth. No control, and no consistency.

At least with my previous ISP I had a consistent wired connection (I aim to not use wireless if possible).

Even as I write this, I am currently watching someone stream on Twitch. That uses up 3-5Mbps, but trying doing anything else or visiting a site takes far too long.

What is "Artificial Intelligence"?

A quick Google search brings me this:

The theory and development of computer systems able to perform tasks normally requiring human intelligence, such as visual perception, speech recognition, decision-making, and translation between languages.

Google: "define artificial intelligence"

So what does this mean for Games Design (shocker, an article on a different subject)?

The way I see it is that it basically means how the game reacts and interacts with the player. This could be enemy spawn rates, aggro'ing, or changing the difficulty based on the player's performance.

What about "learning AI"?

I wouldn't say that is much different than "regular AI", except for it saves it's previous interactions, the actions and results, and then aims to figure out what the best possible solution is to reach it's set goal.

Let's use Mario for an example.

There are a lot of power-up blocks in any one of the games.
The AI could have some code to track how the player's interact with these blocks. It could save which power-ups are more desirable based on this info (i.e. players will go for the Tanooki Suit over the Fire Flower).

Now, say the game had a "Random Block", which would put in a random power-up. It could use the data collected to see what the player's preferences are and fill that block with their preferred power up.

Using another Random Block scenario, say that the player can see what the power-up will be. The AI could randomly fill the block and record if player's grab the Power Up or not; it could then optimise it's selection process to fill the block with the more popular power-ups.

Any other examples?

There is at least one game which I've played (the name of which I've forgotten) where if you die too many times, it asks if you want to change to an easier difficulty.

This, is a part of AI. It takes some values (i.e. the number of consecutive deaths) and makes a decision (i.e. the prompt to change difficulty).
It's a small thing, and very basic, but it's a part of it.

The difficulty setting in of itself can be a complex process or very basic.
I.e. changing enemy stats so they hit harder and take longer to defeat, turning on/off features, or even making enemies "smarter" by running around obstacles and ducking for cover, rather than running directly at the player.

Those levels of "intelligence" vary.

Quick Summary

It essentially comes down to how complex you want your game to be.

Damage calculation is AI.

if(targetHit) {
  HP = HP - Damage

  if(HP < 0) {
    Die
  }
}

Spawn rate is AI.

if(EnemyCount > 10 && EnemiesKill < 25) {
  SpawnEnemy
}

Or, as I said previous, player tracking is also AI.

if(playerPos < 10) {
  moveToPlayer

  if(coverObject < 5 && playerIsGood) {
    takeCover
    wait(5s)
    shootPlayer
  }
}

So you can make it as complex as you need it to; it's all about setting some goals for what you want the game to do, and write the rules to achieve those goals.

Just don't make it so the machines set their own goals and rules... that's when they'll take over.

It doesn't matter how long you've been a "developer" for, you always need to test things.

I say this coming off the back of spending this entire morning (yes, the same day as I am writing and publishing this article) going through this very site and fixing things with the theme.

I had recently been doing some updates to the parent theme, and without realising, inadvertently affected the site's child theme.

This essentially made my the responsiveness null and void. Developer error.

How long this was the case, I don't know, but it's only because some random person on Curious Cat sent me a "question" saying that my site wasn't very mobile friendly.
And I was shocked to find out they were right!

Even now I am still working on the theme.

Sure, I could have rolled back the themes or even just found old code, but in hindsight, it's better to re-write the code, to make it cleaner and up-to-date with modern technologies.

The main time-sink is the testing; going through each page and seeing what works and what doesn't on each of the browsers and devices; and there is even more testing afterwards.

So a huge thank you to the Anon user on Curious Cat for bringing this to my attention.

And it just goes to prove how you cannot just assume.
Some things are a given ("this should work first time", or "this works here, so it'll work here") and some things need to be put through the ringer, but everything should be tested and depending on how complex, all the more so.

The simpler, the better, IMO.

Update: A few hours after I wrote this, I broke the site. Luckily I had a backup of the working file that was causing the issue.
See, this is why testing and backups are important.

A little secret

Okay, today I'm going to tell you a nice little method I've been wanting to try out for ages.

If you are unaware of CI/CD, Jenkins, Auto Deployment, DeployHQ, etc., they're essentially methods to push changes to a site with as little interruption as possible.

Instead of manually uploading via FTP yourself, what these services do is use a number of methods to update your live site to avoid down-time.
This way it's between the two servers, and not my computer, which I am using and can have uploading issues.

This doesn't stop programmer errors, but checks that the files don't break the site (and makes sure all get uploaded).

What are the options

There are a number of options, as mentioned previously. I've had the most success with DeployHQ, but that is a paid-for service.
GitLab has a nice little feature built-in, but I've not been able to (con)figure it out*.

* see, that's a joke because you need to configure the settings

So, after scratching my head for a while, I had an idea. I understand Git pretty well, so why not just pull from the repo to the Live site?

Well, I've just tried it now, and it works!

Method

Okay, so I had my site live for quite a while now, but I need to use the Git repo. The easiest way was to make a copy of my site's directory and give it another name as a backup.

Then, once I was happy, I cloned the repo to the server. For this instance, I cloned it into a different name (because safety), but you could just clone it directly down if it's a fresh site (or you are feeling daring).

Once cloned, all the files will be on the site and good to go (or renamed to the correct name if you are being cautious like me).

Now whenever I make changes to my site, I can test locally, see they work and push up as normal.
I then log into my server and simply fetch and changes and pull them down for the site.

The process is no different than if you are working on two different machines and need to keep the code up to date.

Final thoughts

I'm pretty sure there are quite a few redundancies in place using other, more fleshed out, processes, but as I keep a close eye on what is going on and know what should happen, this suffices (for now).

Using a similar "cautious" method, I could clone into a separate directory, make sure it has worked correctly, then rename the folder (deleting the old/current).

But hey, this is just a shot in the dark to try and make my life a bit easier.

After all, it's better to expend more energy to automate a process than have to do it manually all the time.

Classic Niall Limited © 2022

Contact Us

Classic Niall Limited
The Wesley Centre, Blyth Road
Maltby, Rotherham
S66 8JD
hello@classicniall.co.uk
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram