Posts Tagged ‘web hosting’

Deploying to cPanel using git

Monday, February 15th, 2021 | Programming

cPanel now has support for deploying via git. Here is a quick guide on deploying PHP applications.

Upgrade Composer

The Composer version is old and will need an upgrade. To do this, you need to log into the server as root and run:

composer self-update

Install your SSH key

To avoid having to enter your password every time you push, log into cPanel and add your public SSH key. You can paste the id_rsa into the box and leave the name as default. Once added, go to the manage key and activate it.

Create a git repo

In cPanel, go into the git section and create a new repo. You can place it anywhere so perhaps a good place to put it is:

/home/username/git/repo-name

Add a remote

Back on your own computer, add the new cPanel repo as a remote.

git remote add cpanel ssh://username@example.com/home/username/git/repo-name

Add a cPanel config file

If you need to run any additional tasks, add a .cpanel.yml file to the root of your repo.

deployment:
  tasks:
    - composer install
    - /bin/cp -a /home/username/git/repo-name/public /home/username/public_html

5. Add a .cpanel.yml script

Push your code

Do a standard git push to deploy.

git push cpanel master

You can find the logs in /home/username/.cpanel/logs/ to find out if everything went as planned.

Real Value Hosting

Saturday, December 24th, 2011 | Reviews, Tech

Eight years ago, I was outgrowing my current hosting package, and needed to find pastures new. So I headed over to a web hosting forum and found a post about a company named Real Value Hosting. They seemed to have everything I needed, and a reasonable price, so I decided to give them a go and sign up.

Little did I know at the time, but I was actually their second customer to sign up!

Eight years later and I’m still a happy customer. There have been a few glitches over the years as you would expect with any host, but overall I am more than satisfied and their support response times have always been reasonably quick and consistent, which is probably the biggest concern when selecting a hosting company.

As I’ve now migrated my entire online portfolio onto the LAMP stack, I’ve recently retired my reseller account with them, but I would highly recommend it to those looking for a Windows hosting provider.