Development

TYPOlight Tutorial - Installation Checklist

This tutorial briefly goes through a checklist when installing TYPOlight on a hosting environment. It only goes through the important steps, as it assumes you know how to complete forms and you have all your information handy.

This tutorial assumes you're installing TYPOlight in the root of your website. Please make adjustments for other folder locations.

Step 1: Files

  • Copy the ZIP file to your Hosting server and unzip, ensuring
  • Unzip (or get host company to unzip) the ZIP file.
  • Ensure that the contents inside ZIP folder is in the root of the website, e.g. index.php, preview.php, etc.

Step 2: Permissions

It is highly recommended to use the Safe Mode Hack (FTP Hack) instead of making folders writeable (CHMOD 777) for everyone!

These instructions include removal of the example website. Always remove this for a client production site.

Delete the following files/folders:

  • /templates/example_website.sql
  • /tl_files/music_academy/

Change the following files/folders to have 777 WRITE permissions:

  • / (TL root folder only) so you have access to create CSS and RSS files in root of site
  • /print.css, /basic.css, /news.xml
  • /tl_files/ folder recursively (otherwise you can't create folders with File Manager)
  • /system/config/localconfig.php (for installation to change settings in this file)
  • /system/tmp/ folder recursively (for cache files)
  • /system/log/ folder recursively (for log files like error.log, email.log, etc.)

3. Install Script

Run the install script /typolight/install.php:

  • Setup Admin Account
  • Create /encrypt.txt file (600 permissions), and insert auto-generated encryption key (safekeeping)
  • Enter Database info
  • Create default tables

4. Modify .htaccess

Its always best to configue TYPOlight to use mod_rewrite. If your hosting provider supports this, continue, otherwise skip this section, and leave Enable Rewrite URLs off in the Back-end settings (next-step).

Change .htaccess files
In case your version doesn't include the default mod_rewrite lines, you can recreate them as follows:

  • /templates/.htaccess copy to /.htaccess and edit contents to:
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .*\.html$ index.php [L]

Custom Template, CSS and Images

Should you wish to create your own page TPL templates, and you wish to group your design files together in a folder, I usually call the folder a name similar to the TPL file for the site design, e.g. fe_company.tpl and folder is fe_company to contain the CSS and Images required for the layout, e.g. css/style.css, images/menu.jpg, etc.

To prevent the browser from being denied access to files within this folder, you need to remove the .htaccess control of the /template folder.

  • /templates/.htaccess copy to /templates/fe_company (example) and edit contents to:
order allow,deny
allow from all
 
Options All -Indexes

The last line, will prevent directory browsing of your folder that's now visible to the browser.

I prefer to have my design in a single folder, rather than in 3 different locations: CSS in / root, TPL in /templates and images in /tl_files. I use these custom CSS folders to group my design. Therefore I don't use TYPOlight's built-in CSS and TPL template editor and store their images in /tl_files.

5. Back-end Configuration

Run Back-end: http://www.yoursite.com/typolight/ (example only) and configure the site using the following Modules in the left navigation tree.

Settings

  • Enable Rewrite URLs (now that .htaccess is setup)
  • Change Site Name to: Company webCMS or Company CMS
  • Change Timezone to (GMT+X or Country/City)

Templates

  • Create a Page Template based on fe_page.tpl => fe_company.tpl (or copy using FTP)
  • Put your custom HTML/PHP code in this fe_company.tpl file

Page Layout

  • Create a Page Layout using the above Template fe_company.tpl

Site Structure

  • Add a Root Website under main CMS tree as above and configure as follows:
  • Assign a layout: [Page Layout] as above
  • Assign a cache timeout value of [15 mins, or your default choice ]

The end-result should be something like this:

Site structure

I've found its best to create this Site Root under the website CMS tree, as it allows you to easily add new domains later and it also provides a parent point to use for page mounts and permissions. So, even if you're only installing it on 1 site, its always a good idea to create this double-tree naming.


Tutorial created by thyon from thyon design

Attachments