Contao is an open source content management system(CMS) that is flexible, secure and economically easy to expand. Among its many features, Contao includes a search engine, file manager, blog module, calendar module and form generator. The following article explains how to install Contao using the installation application called Softaculous found within Cpanel.
Setting up Contao using Softaculous in Cpanel
- Login to the Cpanel
- Before you begin installation, look for the Software/Services section and click on PHP Configuration.
If the PHP version is not set to 5.3, then you will need update it. Failure to do so will result in an error that will appear when you try to launch Contao. The error you will receive will start with the following: "Parse error: syntax error, unexpected ':' ...". Contact Web Hosting Hub Technical support if you have any problem changing this setting.
- Next, return back to the main Cpanel screen and then locate the Softaculous icon in the Software/Services section. Here's a quick screenshot of the section in the Cpanel:
Click on the Softaculous icon to open it.
- In the the PORTALS/CMS list and then locate CONTAO and click on it to select it:
When you click on the Contao installation link you will see the following:
The screen describing Contao will appear as per above. In order to begin the installation process. Click on the blue INSTALL button above the description.
- Fill in the Contao Software Setup section to properly configure it:
Choose Protocol Choose HTTP, unless you have purchased a SSL certificate for the domain name you're using for the setup of the software
Choose Domain DOMAIN (or URL) of the website for the CMS installation
In Directory Physical location of the installation files. If you intend to have the installation anywhere but the root of the domain for the software installation, remember that it affects the URL. For example, if your primary domain was Example.com and you installed to a folder named 'CMS' in the root of the directory, then the path for your site would change to Example.com/CMS.
Database name Name of the database to be created; if you look in the MySQL databases section after the installation is complete, you will find the database name that you specify here preceded by the cpanel user name. ALL database names and user names will be prefixed by the Cpanel user name.
Admin User name Administrator name for the Database
Admin Password Administrator's password for the database
Admin Real name Name for the Administrator user
Admin email Email for the Administrator (make sure to provide a valid email for possible password recovery)When you have completed filling out of the fields in the Software Setup, fill in an email address at the bottom of the screen. This will allow you to preserve the installation details by having an email sent to you with the settings that you have used. Then click on the INSTALL button at the bottom of the screen in order to proceed.
- When the installation completes you will see a screen:
Make sure to make note of the Administrative URL. This is the URL that you will use to login to the Administrator for Contao. If you do not have access to Softaculous, you can find instructions for manually installing Contao here: Manually Installing Contao.
After completing the installation, if you wish to start becoming familiar with the back end interface, start with Becoming Familiar with the Contao Back End. Then proceed with the Quick Start Guide to Website Creation in Contao to jump in and start experimenting with the software.
Manually Installing Contao
Occasionally, you will not want to utilize the Softaculous installation procedure for your Contao CMS website. This would mean that you would have to install Contao manually. The procedure for loading Contao manually involves uploading the installation files, moving the files, creating a database and running the installation application provided by Contao. The following article explains how to load Contao manually using the tools found within Cpanel File manager.
Using the Contao Installation Files for Manual Installation
Setting up the File Structures for the Contao Installation
- Before beginning you will need to download the latest Contao files. This is the same link as going to the Contact.org website and clicking on "download" in the top menu. When you go to this link you will have the option to download different versions of Contao, but the latest version is 3.03. The installation documentation uses this version of the software. Note that the installation files are compressed using two different methods. If you are familiar with the .tar.gz package you can download it and use it, or if you are not familiar with it, simply use the .zip package. They include the same files. When you download the files, you will be requested to agree with the GNU Lesser General Public License (LGPL) for using Contao. Simply click OK and you will be able to download the file.
- First we will need to move the files into the correct location. We will be using the File Manager in Cpanel in order to do this. Login to the Cpanel and then click on File Manager to launch it.
- Once you have launched the File Manager, go to the folder that you have chosen for your Contao installation (e.g. the primary domain defaults to /public_html/). Click on the destination location, then click on the UPLOAD option in the menu bar for the file manager. If you initiate the upload in the folder where your files will eventually be saved, then it will save time and make it easier for you to quickly complete the installation without having to move files. Use the BROWSE button to navigate to the location where you downloaded the Contao installation file on your computer. The screenshot below shows an example what you will see:
- When you have located the file you have downloaded from Contao, click on the installation file to select it, then click on OPEN in the bottom right hand corner. It will automatically start uploading. When it completes, you will see text in the bottom right hand corner of the upload screen like this:
When it has completed uploading, then click on the "Back to /home/..." link at the bottom of the upload screen to return to the File manager.
- After you have uploaded the file to the server, you will see a file labeled: contao-3.0.3.tar.gz (or contao-3.03.zip). You can use either file. The main difference is simply compression efficiency. The .tar.gz file is only 7.3 MB and the .zip file is about 9.5 MB. Both files can be extracted through the extract utility within the Cpanel. Click on this file to select it, then in the top right hand corner click on EXTRACT.
The screen shot above shows the contao-3.03.tar.gz (or contao-3.03.zip) file has been selected and is located in the public_html folder. Note the location of the folder can be where you wish to place it (within the public_html folder), so it does not necessarily need to be located in the folder designated for this tutorial. Click on EXTRACT in the top right hand corner to extract the files from the compressed file. You will see a dialog screen to determine where the files will be extracted:
- Click on EXTRACT FILE(S) in order to extract the file to directory that you have selected. The EXTRACT dialog includes the location destination location where the files will be extracted.
- When the extraction has completed the file manager should show the files as follows:
Notice that the compressed file still exists. At this point, the compressed file is no longer needed and can be deleted. Double-click on the contao-3.0.3 folder to select it and see its contents. It should appear like the following:
- The next part of the installation will be to MOVE the files into the correct location. They cannot be in the contao-3.0.1 folder. If you were to keep the files in that folder, then if your primary domain was called yourdomain.COM, the actual path to the installation would be http://yourdomain.com/contao-3.0.3. Click on SELECT ALL in the top right hand corner of the file manager in order to select all of the files in the folder. Once all of the files have been highlighted, click on MOVE FILE.
- The purpose of moving the files is to move them from the contao-3.0.3 folder into the root directory or other location that you are using for the Contao installation. Once you have selected all of the files, then click on MOVE FILE. You will see the following dialog: Click on the bottom line in order to specify the location where you move the files and folders.
- Once the files are in place, then you can proceed with running the installation. The installation will work through the URL where you have placed the files. For example, if you placed the files in the document root (web root) of the primary domain, then the files would be in the public_html folder. If the domain were yourdomain.COM, then the installation path you need to type would be yourdomain.COM/contao/install.php. Open your internet browser and then start the installation. You will see the license screen appear first:
"Read" through the license and then click on the ACCEPT LICENSE button.
- Next you will see a screen to set a password. The password needs to be at least 8 characters and you will need to type it twice. This password is for securing the Contao Install tool (as per the Contao screenshot below). If you leave the installation at a particular point, then you will need to log back in with this password to continue.
This completes the file setup section. The next part of the installation requires the use of the MySQL database features of the Cpanel in order to set up the database. Do not leave/close the installation window above. Simply open another window to complete the database tasks, then return to this position in order to finish setting up the Contao CMS.
Setting up the Database for the Contao Installation
Manually setting up Contao will require that you use MySQL to setup a database and database user for the installation. The following instructions will guide you through the steps to meet this requirement.
- In the Cpanel, go to the DATABASES section, the select CREATE NEW DATABASE:
- Note that every database you create will start with your account prefix. So, if your account prefix is example5, then the database name would be something like:
Click on CREATE DATABASE in order to create the database.
- Once the database is created, the next step will be to create the User who will be accessing the database. Like the database, the user name will start with the account prefix:
Note that you will need to set up a password for the user. Make sure to record this password so as not to lose it.
- Take the user you just created and then assign it to the database you have created. You will select the user and the database, then when you have done so, you will need to assign the privileges the user has for the database. Simply click on ALL at the top as per the screenshot below:
- Once you have selected the privileges that the database user will retain , click on MAKE CHANGES in order to save your selection.
- When you have completed checking your database, you can take the next step in the manual installation process. Return to the window where you left off above, and then proceed.
The final part of the Contao database setup starts with the login screen using the password for the installation. This should be the same as the database user password. If you get it wrong, it will send you back to the database configuration screen. After getting it correct, you should see the following:
The update screen is fairly long, so only a partial copy of it will show here. Note that at the bottom of all the database updates there is a button labeled UPDATE DATABASE. If you get an indication that the tables are not updated (as per the red text in the screenshot above), then click on the UPDATE DATABASE button to update the database.
There were two sections that were not discussed in the steps above: Generate Encryption Key and Collation. Use the Encryption option only if you plan to use the key to decode or encrypt data within your database. Collation should not be changed from the default value (utf8-general-ci) unless you know how to use collation within your database.
Finalizing the Contao installation
- When the database completes updating (usually a very short period of time), then you will be able to move to the next session which starts with the template:
The default installation comes with a template called music_academy.sql. Simply click on the drop-down menu to choose it. Click on IMPORT TEMPLATE to complete this section. Note that using the template creates a demo website for Contao complete with users and other entries.
- When the installation of the template completes, you may see a log-in screen appear. Make sure to use the password you used for the database user. The final section asks for you to setup an Administrator user:
- After you have completed filling in all of the fields for the Administrator user, you will see a screen indicating that you have completed the Contao installation!
Manually installing the Contao CMS requires many steps that involve different sections within the hosting account to successfully complete. It covers the upload and de-compression of the installation files, the movement of the files through File Manager, the setup of a MySQL database and the setup of the Administrator user. If you require any further information on the software installation for Contao, please contact our Web Hosting Support Center and we will be happy to help.