How To Deploy A Git Application On Whogohost Shared Hosting
Do you know shared hosting users can now leverage git application for their project deployments?
A lot of developers working on a shared hosting environment often upload their application after series of coding locally.
Another set of developers prefer to create a direct synchronization through an FTP account which allows them to update changes directly to a remote directory.
Most times, the entire process of uploading source codes to the directory can be frustrating especially if you have multiple instances of web-applications running on different subdomain directories on your shared hosting environment.
Do not be frustrated, the long-awaited shared hosting synchronization with a git repository is now available on Whogohost, Africa’s largest web hosting company.
For many other developers, deploying via git is a lot easier for them since they can have different working versions of their apps in the same repository. They can also select which branch of the repository they want to deploy live.
In this article, we will be using a sample git repository on Github, the most popular git platform as I will be showing a few steps on how to deploy a webpage directly from Git repositories. You can use the built-in version control or integrate with other git platforms such as bitbucket and Gitlab. The next article will contain a step by step process to full application deployment with DB integration.
Firstly, I will want to assume that you have a prior knowledge of git and a shared hosting environment and that also means you are familiar with Cpanel. Let’s get started.
Login to your website’s Cpanel and select Git’s version control which can be found in the files section of the Cpanel.
Cpanel
Create a new a new repository by clicking on the create link.
Create a new git repository
I have cloned a Bootstrap starter template into a sample webpage repository on GitHub, which you can find in the sample webpage repository.
Create a new git repository on GitHub
We will, therefore, copy the repository’s clone URL, sample-webpage GitHub repository, and make use of it in the following image.
Create or clone repository
By setting the repository path to public_html/webpage means our repository will clone the app from github to a webpage folder in the public_html directory. You can set this path to subdomain directory or whatever works for you.
You can now go back to the previous page to view the list of repositories, Click on the manage button.
manage repository
You will see available branches in your repository, you can select any branch you want to deploy and the changes will be effected automatically when you visit your website.
Select the repository branch to deploybranchmaster
If you encounter a forbidden error page when trying to access your webpage, change the directory permission to 755. You can do this from your file manager.
Forbidden error message
Change the webpage’s directory permission from the File manager to 755
Main page
I hope you enjoyed this guide and found it useful? Now that the website is up and running, do share this post. Do you have any contributions that you might like to add or a question? Drop a comment and I will get back to you. You can also send an email to technical@whogohost.com if you need further assistance.