PHP Fog Blog


We love the opportunity to share our customers successes using PHP Fog, and it’s even better when we can share what they’ve built and what they’ve learned using our platform. Today, we’re bringing you a How-To article on getting started with WHMCS – an all-in-one client management, billing & support solution for online businesses – on PHP Fog. This post comes in courtesy of our customer Steven Eksteen, who kindly allowed us to republish his work. Steven shows us how to get WHMCS up and running on PHP Fog and how to add cron support to the app.

Image of the PHP Fog Logo

Well, this is how I did it…

PHP Fog makes me almost like PHP again or rather like working with PHP. Managing infrastructure is, for me at least, like sitting in a room full of Man United fans after they have just won a game, painful. Maybe PaaS has just made me lazy.

With WHMCS & PHP Fog you can get going for about $16 for WHMCS & $30 for PHP Fog Per Month. You could use PHP Fog’s free shared cloud for testing.

I’ve created my app…

Before cloning your assigned git repo and while you’re still on the PHP Fog interface, just add the WHMCS permissions quick. Like so…

Screen shot of the PHP Fog Web Console Write Permissions section

You can now clone your repo.

Once you have a local copy delete the “index.php” and copy the WHMCS files in.

Rename the “” file to “configuration.php”. Yes, it’s supposed to be a blank file.

You can now go ahead and send the files to your app…

$ git .

$ git commit -am “Fresh WHMCS install files”

$ git push origin master

You will now need your MySQL settings that PHP Fog created for you with your app

Screen shot of setting up database instance via the PHP Fog Web Console

You can now just goto your app URL and install WHMCS like normal.

Once installed you will be prompted to delete the install directory. You can delete or rename it, it doesn’t matter.

Done? Then you will need to make sure your blank “configuration.php” file does not overwrite your configured on on the server.

$ touch .gitignore

$ vi .gitignore

You can then add configuration.php to the file and save. My file looks like this


You will then have to tell git to stop tracking the configuration.php file, and the others

$ git rm —cached configuration.php

You can now push again to remove/rename the install directory on the server

$ git add .

$ git commit -am “Rename install directory”

$ git push origin master


The local copy

The following is not at all a requirement. I just find it most helpful.

Since the “configuration.php” in you local copy is still blank. You could rename the install directory back to install, or copy it in again and run a local WHMCS install. Just don’t push your changes until you’re done and removed/renamed the install directory again.

With a working local copy of WHMCS you can create your templates and modules and just push your repo to send then to the server having tested them first instead of doing it blind. Remember, there is no FTP access to your files so you will have to use git to push and pull files.

In his follow on post, Steven shares how to add cron support for his WHMCS app….

As per the PHP Fog documentation cron jobs can be done using two providers:

The latter didn’t load for me, probably just my fantastic internet connection.

So I went and got an account at Fantastically simple signup, just linked it to my Google account (but they have other linking options too).

The system is really everything you need. Nothing flashy, it works and it’s free.


WHMCS’s “cron.php” is located at “WHMCSROOT/admin/cron.php”. So the URL would be like “” and set it to run once a day.

Screen shot showing set up of cron support for WHMCS

…and you’re done.

Many thanks to Steven for sharing his knowledge with us. We’re always excited to see your How Tos and articles on PHP Fog. Drop us a line and tell us what you’re learning!

Powered by Olark