Installation & Troubleshooting

The Basics:
Firstly, you should have the ability to use MySQL via PhpMyadmin, MySQL Workbench or Cpanel.
You will have to have a preexisting MySQL User that can Create Database.
The Install will ask for the Host, User Name and Password and allow you to choose the
name for the new database. If a preexisting database with the same name exists, it’s advised
you create a different name or delete the preexisting database beforehand.
If you’re using GoDaddy, the installation will assuredly have problems with creating the database.
You’d think something so simple…. but anyway, the long road.
Log into Cpanel, create a new database and database user for the new database, set ALL Privileges and run the install.
If the site does not populate or the database cannot connect, edit the admin/config.php
manually.
I have nothing nice to say about this.

Installation:
Unzip the files to your http server wherever you plan on installing to.
There are no limits on how many installations you can create or how you
navigate to them, Root, Subdomain & Sub-directories all work the same.

If you’re running on localhost, you may have to change folder permissions depending
on how you unzip / install. www-data must have control over the directory, so if
you run into any installation issues regarding the overwrite procedure simply:

sudo chown -R www-data:www-data /path/to/installation/

During development this issue arose several times, so I’ve packaged all files with the permissions
set, if you edit them, you may have to change permissions depending on your host and user configuration.

The Installation Page:
You will be asked for the Database Host, Database User, Database Password, Database Name and The URL you
are installing to. The url is important as it is the url that will be submitted to Google and Bing upon
successful installation. You should see a brief page when the site submits that it has been created.

Hatcher Options:
The Hatcher is a “Big Player” in the CMS, it creates and deploys the Website and contacts the Search Engines
every time it’s run.

Recommendation:
Make any modifications to the index template  (admin/index_template.php) before running the install.
Eliminate the “Refresh Content” button and replace it with your own code or image..
Create a new css..
Be Creative!

The Sitemap (sitemap.xml) is generated as if each page was created throughout the day, so it may cause some
question if a page that hasn’t yet been created is being submitted.

*See Also: Set Default Time Zone

I Highly Recommend setting a cron job to run at 11:59 each day as such:

crontab -e
59 23 * * * /path/to/admin/hatcher.php
Examples:
Cron & Php
crontab -e 59 23 * * * /usr/bin/php -q /path/to/admin/hatcher.php >/dev/null 2>&1
Cron and cUrl
crontab -e 59 23 * * * /usr/bin/curl https://www.yourwebsite.com/admin/hatcher.php

If you’re not comfortable with crontab, you can call the file from the command line as well,
or just open it in your browser.

CLI:

php /path/to/admin/hatcher.php

Browser: https://www.yourwebsite.com/admin/hatcher.php

Set Default Time Zone:

You can edit the default time zone in admin/config.php
This will not effect the bogus file creation times, it only sets
the actual time the sitemap is submitted.

// Set Default Time Zone
date_default_timezone_set(‘America/Los_Angeles’); // Your Time Zone
$TIMESTAMP = date(‘m/d/Y h:i:s a’, time()); // Real Time
// End Timezone Config

Facebook Page Preview:
Each time a page is loaded the facebookexternalhit bot will refresh the page preview.
This is enabled by default and is the third require in the index_template.php
If you edit the index.php it can and will be overwritten each time new files are hatched.
This feature can work in your favor, or against you if you hatch files too often or use
bots against your pages.
Choose Wisely.

Editing and Modification:
Edit and modify at your leisure, I highly recommend you make sure to back up everything,
keep your original zip file handy and keep an eye on your file ownership and permissions.
I’ve left as many comments in the files as I felt useful, if your confused, feel free to
contact me.