Installation
From Contao Community Documentation
Contents
Requirements
- Webserver (Apache, IIS, etc.)
- PHP version 5.2 or greater
- MySQL version 4.1 or greater
- PHP extension GDLib
- PHP extension mcrypt (optional)
Installation
- Download a Contao package
- Extract the downloaded archive onto your server
- Download the system check tool and extract the contao-check.php file onto your server
- Once extracted, point your browser to http://yourserver.com/contao-check.php
- Fix any warnings or errors that it detects
- Point your browser to http://yourserver.com/contao/install.php
- Follow the instructions of the install tool
Cleaning Up
- Login to the backend of Contao (http://yourserver.com/contao/) to test that the installation works.
- Remove http://yourserver.com/contao/install.php for extra security.
Configuring .htaccess
- Make a backup of your .htaccess file if you have one
- Remove the .htaccess file and rename the .htaccess.default file to .htaccess
- In the Contao backend go to System>Settings and under the Front end configuration enable Rewrite URLs and specify your URL suffix
- Uncomment the following lines in your .htaccess file:
- RewriteEngine On This enables the rewriting of URLs
- RewriteBase / This sets the base directory for the rewrite. Change this if contao is in a sub-directory. (e.g. apacheroot/contaoishere/)
- RewriteRule .*\.htm$ index.php [L] This sets the rewrite rule. It should match the suffix that you specified in the Contao backend! This example is for the .htm suffix.
Troubleshooting
Install tool asks for FTP details
If the Contao install tool asks you for FTP details in order to enable the Safe Mode Hack ensure that www-data owns the directory that Contao is in!
On Linux you can do the following: chown -R www-data:www-data apacheroot/
Note: You may need to run the command above as superuser.
I can't accept the license agreement
If you can't accept the license agreement on the install tool then you may have a permissions error. Ensure that www-data owns the web server directory.
If www-data does own the web server directory then you can add the following line to localconfig.php file to accept the license:
- $GLOBALS['TL_CONFIG']['licenseAccepted'] = true;