Quick Start Guide

The following will show you how to install and configure Sitecmd in under 5 minutes.

Step 1 - Download

First you will need to download Sitecmd.

If you have the ability to use the git command-line application on your server, this is just a case of running git clone git://github.com/vxnick/sitecmd.git in the directory where you want sitecmd to live.

If you've downloaded the ZIP archive, you should unzip it and upload the sitecmd directory to the target directory.

Note: It is recommended that you put the sitecmd directory in a non web-accessible directory, and to move the .htaccess and index.php files to the web-accessible directory.

Step 2 - Setup

Now that sitecmd is located in the desired directory, you need to modify the RewriteBase line in .htaccess to point to the URL where you want sitecmd to be accessed. For example, if you want Sitecmd to run your entire website (http://www.example.com/), you need to set RewriteBase to a single forward slash. If Sitecmd is to run from a sub-directory (such as http://www.example.com/foo/), then you should set RewriteBase to /foo/ (note the leading and trailing forward-slashes).

Now you need to modify the $sitecmd_path in index.php. This path needs to point to the sitecmd directory (which contains sitecmd.php). Assuming you have put this directory outside the web-accessible area as recommended, you will most likely set the path to ../sitecmd/. This will change depending on whether you are running Sitecmd from the root or a sub-directory of your website. In most cases, it's best to specify an absolute path such as /home/<user>/sitecmd/. Don't forget the trailing forward-slash!

Now, if you visit your website you should see some messages from Sitecmd - either asking that you set permissions on the cache directory or copying site-default or config-default.php. If you see these messages then you can proceed to the next step; if not, re-read this step and ensure your paths are correct. If you're still having issues, feel free to ask for help.

Step 3 - Configuration

Once you have followed the steps that Sitecmd has output to the page, you are ready to modify the configuration and start adding content to your site.

You will have duplicated both config-default.php and site-default - I will explain why you needed to duplicate these in a moment.

You should edit your new config.php file and change any values to suit your requirements. I won't explain what each option does here, as the configuration is well-documented. If you don't understand what some of these values do, feel free to ask for help.

Once you have modified the configuration file, you should add some content to your new site directory.

You will notice that there is already index.php and mailform.php files in the directory - these give you a good starting point, and mailform.php is suitable for use as a contact form or similar on your new site.

Sitecmd allows you to create and use multiple templates for your website. These are useful as they allow you to create a template containing all the header/footer markup as well as any other purposes.

Templates are stored within site/_media/content/ - you'll notice the _media directory - by default, Sitecmd blocks URL requests to anything prefixed with an underscore, so any directories or files beginning with one will show a 404 error if a visitor attempts to directly access it through the URL.