How To Create A Joomla Demo Site
Written by Russell Winter
Creating a Joomla! Demo Site is, in essence, very similar to a standard Joomla! installation but with a few "non-standard" and little known variable changes you can also allow multiple users to login under the same account, whilst limiting what user details can be changed such as email and password.
- Install Joomla! as standard, selecting a sub-directory or sub-domain.
- Navigate to the "includes/" directory and modify the following lines in version.php
- This can be achieved either online through SSH or FTP the file to your local PC, modify it there and re-upload it
From:
/** @var string Whether site is a production = 1 or demo site = 0 */
var $SITE = 1;
/** @var string Whether site has restricted functionality mostly used for demo sites: 0 is default */
var $RESTRICT = 0;
To:
/** @var string Whether site is a production = 1 or demo site = 0 */
var $SITE = 0;
/** @var string Whether site has restricted functionality mostly used for demo sites: 0 is default */
var $RESTRICT = 1;
$SITE = 0
Allows
multiple user logins with only one account. By default Joomla! allows
only one active session per account as a security feature.
$RESTRICT = 1
Disables those logging in, both frontend and backend from changing user details - like password and username
- Confirm the site is working as expected
- Now modify your site to reflect your "Demo Site" requirements.
- Make all files and folders nonwriteable - especially the configuration.php file.
Thats the Joomla! aspect of the "Demo Site" complete, now you need to consider how to "Refresh" the content back to a default on a schedule, so as visitors test and play with the site, it will get cleaned up regularly.
- Download the scripts provided here ( http://forum.joomla.org/index.php/topic,42048.0.html ) by Wizzie
- FTP to your server space (below the publically accessible area's, the script contains dB passwords!)
- Rename each script to what you want, removing the " .txt "
- chmod each file to 755
- Configure the required settings in both scripts (dBase's, usernames, passwords)
- Read the comments, they describe what is needed.
- Run autoSiteDUMP.sh
- This will backup your configured databases in to another directory. This only needs to be run once, or when ever you
- Setup a crontab to run autoSiteRESTORE.sh at a timeframe that suits you.
85,45% of 55 voters found this FAQ useful, I found this FAQ  useful  not useful
|