Installation - LimeSurvey CE
From LimeSurvey Manual
(Redirected from Installation)
Make sure you can use LimeSurvey on your website
Make sure your server meets the following requirements.
The minimum set of requirements for LimeSurvey:
- Minimum 500 MB disk space (the unpacked LimeSurvey 7.x package alone takes about 380 MB), plus space for your uploaded files and survey data.
- MariaDB 10.3.38 or later OR MySQL 8 or later OR Microsoft SQL Server 2019 or later OR Postgres 14 or later.
- PHP version requirements:
- LS 7.x from PHP 8.1.29 and up (Tested up to PHP 8.5.x)
- LS 6.x from PHP 8.1.x to 8.3.x
- LS 5.x from PHP 7.2.5 to 8.0.x
- LS 3.x from PHP 5.5.9 to 7.4.x
- PHP
memory_limitof at least 128 MB. - The following PHP modules/libraries must be enabled:
- mbstring (Multibyte String Functions) extension library.
- PDO database driver for MySQL/MariaDB (pdo_mysql) or Postgres (pdo_pgsql) or MSSQL (pdo_sqlsrv for Windows and pdo_dblib for Linux).
- GD - see PHP GD-Library Extension documentation
- Zip - see PHP Zip Extension documentation
- Zlib - see PHP Zlib Extension documentation
- Curl library
- fileinfo
- JSON
- Also, we assume in general that all PHP default libraries are enabled, for example:
- ctype
- filter
- hash
- openssl
- session
- SimpleXML
- etc …
- For LimeSurvey 7.x: The URL format must be set to path (URLs like index.php/admin). The old get URL format (URLs like index.php?r=admin) is no longer supported. The installer sets the path format automatically, so you only need to check this if you reuse an older config.php file with
'urlFormat' => 'get'.
Optional PHP Extensions:
- GD-Library with FreeType and JPEG support is needed for captchas, nice charts in statistics or to upload images via the HTML editor - see PHP GD-Library Extension documentation
- IMAP is needed for the email bounce tracking system - see PHP IMAP Extension documentation. Since PHP 8.4 the IMAP extension is no longer bundled with PHP and has to be installed separately from PECL.
- LDAP is needed to import survey participants using LDAP - see PHP LDAP Documentation
- Intl is used for sorting texts correctly according to the rules of the respective language - see PHP Intl Documentation
- Sodium is recommended for data encryption - see PHP Sodium Documentation. If it is missing, LimeSurvey falls back to a much slower PHP implementation.
Recommended PHP settings (the installer shows a warning if your values are lower):
max_input_vars: 5000 or morepost_max_size: 32M or moreupload_max_filesize: 32M or more
In most cases, your web server provider or system administrator will be able to help you out with these optional components.
Browser compatibility
For the survey-taking side, we currently support Edge and all newer comparable browsers like FF, Chrome, Opera etc. with activated JavaScript.
For the administration part, we currently support Edge and all newer comparable browsers like FF, Chrome, Opera etc. with activated JavaScript.
Screen sizes
We support any reasonable screen size for survey taking (360px x 640px and up). The minimum supported screen resolution for the LimeSurvey administration page is 1280px x 1024px.
Hosting for LimeSurvey
LimeSurvey should work with most hosting companies that provide PHP and MySQL/MariaDB. If you want a ready-installed version of LimeSurvey that we maintain for you, try LimeSurvey Cloud. See LimeSurvey Cloud vs LimeSurvey CE for the differences.
Download the LimeSurvey package
Download the latest stable LimeSurvey zip package (there are also gzip, bz2 and 7zip packages available for your convenience) and save it to your local disk.
Unpack the LimeSurvey package
Uncompress the zip file into a dedicated directory/folder using your preferred compression software. When you uncompress the file make sure that you uncompress the directory structure with the files (this is default behavior for most compression programs). The path name for the installation directory should not include '(' or ')' special characters, but it may include the space character.
Collect information about your server
You will need to know the following things to install LimeSurvey on your web server correctly:
- Your intended website URL where your scripts will reside (e.g. https://my.domain.com/limesurvey).
- What webserver software are you using?
- for Apache: LimeSurvey Apache example configuration
- for nginx: please check out our LimeSurvey nginx example configuration (outdated, no editor support)
- The physical disk location on your server where your scripts will reside (e.g. /home/usr/htdocs/limesurvey).
- The IP/net location of your database server (i.e. localhost).
- If your database server uses a non-standard port, find out which port it is.
- Your user name and password for your database server.
- With most providers you can't let the script create the database, but have to do it yourself. If you are using such a provider, please create a database (for example limesurvey) yourself. For MySQL/MariaDB, use the character set utf8mb4 with the collation utf8mb4_unicode_ci.
Upload the files to your web server
Using your FTP/SFTP program (e.g. FileZilla), connect to your web server and create a directory to store your scripts. Then upload the files using the directory structure they are in. Make sure you upload the files in binary mode (check the settings of your FTP program). Please note that uploading in ASCII mode can lead to uncommon errors (e.g. 'class not found' error during installation), also images may not be uploaded correctly. Also make sure that the hidden .htaccess files are uploaded, too - they protect some directories and enable URLs without index.php on Apache.
Set directory permissions
For the script to work properly it needs certain access to some directories - this applies especially to Linux/*nix systems.
- The "/limesurvey/tmp" directory (and all its subdirectories and files) are used for imports & uploads and should be set to Read & Write for your webserver.
- The "/limesurvey/upload/" directory (and all its subdirectories and files) must also have Read & Write for your webserver in order to enable picture and media files upload.
- The "/limesurvey/application/config/" directory also needs Read & Write permissions for your webserver.
- The other directories can be set to Read Only.
Create a database user
LimeSurvey will create a database and the tables inside it. To be able to do this, it will need the user name and password of a database user. We generally recommend creating a database user with the following permissions:
- MySQL/MariaDB: SELECT, CREATE, INSERT, UPDATE, DELETE, ALTER, DROP, INDEX
- PostgreSQL: The easiest way is to make the database user the owner of the LimeSurvey database. Otherwise the user needs the CREATE privilege on the schema plus SELECT, INSERT, UPDATE, DELETE, TRUNCATE, TRIGGER on the tables and USAGE on the sequences.
- Microsoft SQL Server: The database user should be a member of the db_owner role of the LimeSurvey database. If you want the installer to create the database, the user also needs the dbcreator server role.
Run the installation script
Open the URL of your LimeSurvey installation in your browser (e.g. https://example.org/limesurvey). If you configured everything correctly, the LimeSurvey installer starts automatically - just follow the instructions:
- Select the language of the installer and accept the license.
- Check the pre-installation check. All required items must be marked as OK before you can continue.
- Enter your database configuration. LimeSurvey will ask you whether you wish to create the database and/or create the tables inside the database, and will then create the needed tables.
- Set up the administrator account: enter the administrator user name, password and email address, as well as the name of your survey site and the default language.
Connect to the administration script for the first time
You are done when the installation finishes! Open your browser and enter the URL to the LimeSurvey administration. Assuming you used 'limesurvey' as the directory name to store the files in, this will be something like https://www.example.com/limesurvey/admin.
You should get a login screen. Log in with the administrator user name and password you entered during the installation. If you did not change them in the installer, the default login credentials are:
User: admin
Password: password
If you are still using the default password, change it right away in your account settings. Have fun!
Further configuration
For further settings, such as email (SMTP) configuration or security settings, see Optional settings and Global settings.
Caching
LimeSurvey uses the Yii file cache by default, but it can be configured to use other cache engines. Possible other caches are:
- Memcached (CMemCache)
- Redis (CRedisCache)
- APCu (CApcCache)
- Database (CDbCache)
Please see the Yii documentation for full description.
Since LimeSurvey 4.0.0 you also have the possibility to cache calculations in the ExpressionScript. This can provide a significant speed-up depending on survey complexity. To enable the emcache, add this in your config.php file (components array):
'emcache' => array('class' => 'CFileCache'),
As with the main Yii cache, other cache systems can be used.
What if I have problems...
Like all computer programs, most of the time things will work just like the instructions say, but sometimes they just won't. There are too many possible reasons for things not going according to plan to describe here. If you have trouble, first check out the Installation FAQ. If you don't find your answer there, please post your problem and any error messages in the LimeSurvey forums, open a support ticket (only for customers using LimeSurvey Cloud), or join our Discord channel.