Installing DataLife Engine via SSH: Professional Setup Without FTP

15.12.2025
18:29

DataLife Engine (DLE) is a popular Russian content management system for creating news portals, blogs, and information websites. Traditionally, DLE is installed via FTP clients, uploading files one by one, which is time-consuming and error-prone.

The professional approach is installation entirely via SSH command line. It's faster, more reliable, and gives complete control over the process. In this guide, we'll install DLE on a clean server using only the terminal: download the distribution, configure the database, set file permissions, and run the installation script.

Prerequisites

To install DLE via SSH, you'll need:

Server with installed software:

  • Ubuntu 20.04+ / Debian 10+ (commands in article for Debian/Ubuntu)
  • Apache 2.4+ or Nginx 1.18+
  • PHP 7.0+ (minimum), PHP 8.0+ (recommended)
  • MySQL 5.5.3+ or MariaDB 10.0+ (minimum)
  • MySQL 5.7+ or MariaDB 10.3+ (recommended)
  • SSH access with sudo privileges

Required PHP extensions:

  • mysqli
  • mbstring
  • gd
  • curl
  • zip
  • xml

Tools:

  • wget or curl for downloading
  • unzip for extracting archives
  • nano or vim for editing files

Check installed software:

Check PHP version:

php -v

Check MySQL version:

mysql --version

Check installed PHP extensions:

php -m | grep -E 'mysqli|mbstring|gd|curl|zip|xml'

If some extensions are missing, install them:

sudo apt update
sudo apt install php-mysql php-mbstring php-gd php-curl php-zip php-xml

Preparation: Creating Directory and Environment Setup

Navigate to web server directory:

cd /var/www

Create directory for the site:

sudo mkdir -p dle-site

Navigate to created directory:

cd dle-site

Set directory ownership:

sudo chown -R $USER:$USER /var/www/dle-site

Downloading DataLife Engine

DLE is a commercial product, so you must have a license. After purchase, you'll receive a download link for the archive.

Option 1: Download via wget

Use wget to download the archive (replace URL with your link):

wget -O dle.zip "https://example.com/downloads/dle-xxxxx.zip"

Option 2: Download via curl

Alternatively use curl:

curl -L -o dle.zip "https://example.com/downloads/dle-xxxxx.zip"

Option 3: Upload from local computer

If the archive is already on your computer, upload it via scp:

scp /path/to/dle.zip user@your-server.com:/var/www/dle-site/

Verify the file is uploaded:

ls -lh dle.zip

Expected output:

-rw-r--r-- 1 user user 15M Dec 13 10:00 dle.zip

Extracting DLE Archive

Install unzip if not installed:

sudo apt install unzip

Extract DLE archive:

unzip dle.zip

Check contents:

ls -la

Typical DLE structure after extraction:

Upload/
Templates/
README.txt

Move Upload directory contents to root:

mv Upload/* ./
mv Upload/.htaccess ./

Remove now-empty Upload directory:

rmdir Upload

Check file structure:

ls -la

You should see:

engine/
templates/
uploads/
index.php
.htaccess
...

Creating MySQL Database

Login to MySQL as root:

sudo mysql -u root -p

Create database for DLE:

CREATE DATABASE dle_db CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

Create database user:

CREATE USER 'dle_user'@'localhost' IDENTIFIED BY 'strong_password_here';

Grant privileges to user:

GRANT ALL PRIVILEGES ON dle_db.* TO 'dle_user'@'localhost';

Apply changes:

FLUSH PRIVILEGES;

Check created database:

SHOW DATABASES;

Exit MySQL:

EXIT;

Generate secure password:

Use openssl to generate a strong password:

openssl rand -base64 20

Save the generated password — you'll need it during installation.

Setting File Permissions

DLE requires specific permissions on files and directories for proper operation.

Set permissions on directories:

find /var/www/dle-site -type d -exec chmod 755 {} \;

Set permissions on files:

find /var/www/dle-site -type f -exec chmod 644 {} \;

Set special permissions for directories where DLE writes dаta:

chmod -R 777 /var/www/dle-site/templates
chmod -R 777 /var/www/dle-site/uploads
chmod 777 /var/www/dle-site/backup
chmod 777 /var/www/dle-site/engine/data
chmod 777 /var/www/dle-site/engine/cache
chmod 777 /var/www/dle-site/engine/cache/system

Important: 777 permissions are set temporarily for installation. After completing installation, permissions will be tightened (see "Final Permission Setup" section).

Make config file writable during installation:

chmod 666 /var/www/dle-site/engine/data/dbconfig.php

Set file ownership (replace www-data with your web server user):

sudo chown -R www-dаta:www-data /var/www/dle-site

Check permissions:

ls -la /var/www/dle-site/uploads

Configuring Apache Virtual Host

Create configuration file for virtual host:

sudo nano /etc/apache2/sites-available/dle-site.conf

Add the following configuration:

<VirtualHost *:80>
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    ServerAdmin admin@yourdomain.com

    DocumentRoot /var/www/dle-site

    <Directory /var/www/dle-site>
        Options -Indexes +FollowSymLinks
        AllowOverride All
        Require all granted
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/dle-error.log
    CustomLog ${APACHE_LOG_DIR}/dle-access.log combined

    # Optional: enable compression
    <IfModule mod_deflate.c>
        AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/jаvascript application/jаvascript
    </IfModule>
</VirtualHost>

Save file (Ctrl+O, Enter, Ctrl+X).

Enable rewrite module for URL rewriting:

sudo a2enmod rewrite

Activate virtual host:

sudo a2ensite dle-site.conf

Disable default host (optional):

sudo a2dissite 000-default.conf

Test Apache configuration:

sudo apache2ctl configtest

Expected output:

Syntax OK

Restart Apache:

sudo systemctl restart apache2

Check Apache status:

sudo systemctl status apache2

Configuring Nginx Virtual Host (Apache alternative)

If using Nginx instead of Apache, create configuration:

sudo nano /etc/nginx/sites-available/dle-site

Add configuration:

server {
    listen 80;
    server_name yourdomain.com www.yourdomain.com;

    root /var/www/dle-site;
    index index.php index.html;

    access_log /var/log/nginx/dle-access.log;
    error_log /var/log/nginx/dle-error.log;

    client_max_body_size 100M;

    location / {
        try_files $uri $uri/ /index.php?$args;
    }

    location ~ \.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;  # replace with your PHP version (php8.1, php8.2, etc.)
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml|svg)$ {
        expires 30d;
        add_header Cache-Control "public, no-transform";
    }

    location ~ /\.ht {
        deny all;
    }

    location ^~ /engine/data/ {
        deny all;
    }

    location ^~ /backup/ {
        deny all;
    }
}

Create symbolic link to activate:

sudo ln -s /etc/nginx/sites-available/dle-site /etc/nginx/sites-enabled/

Remove default configuration (optional):

sudo rm /etc/nginx/sites-enabled/default

Test Nginx configuration:

sudo nginx -t

Restart Nginx:

sudo systemctl restart nginx

Running DLE Installation via Browser

DLE is now ready for installation via web interface.

Open in browser:

http://yourdomain.com/install.php

Or by IP address:

http://your-server-ip/install.php

Check installer availability via curl:

Verify installer is accessible:

curl -I http://yourdomain.com/install.php

Expected response:

HTTP/1.1 200 OK

Automation via Configuration Files

Important: DLE is not designed for full CLI installation automation. The install.php installer generates configuration files automatically and may overwrite manual changes.

For deployment automation, recommended approach:

Prepare environment via CLI (download, extract, permissions, database):

cd /var/www/dle-site
wget -O dle.zip "https://your-download-link.com/dle.zip"
unzip dle.zip
mv Upload/* ./

Create database:

sudo mysql -e "CREATE DATABASE dle_db CHARACTER SET utf8mb4;"
sudo mysql -e "CREATE USER 'dle_user'@'localhost' IDENTIFIED BY 'password';"
sudo mysql -e "GRANT ALL ON dle_db.* TO 'dle_user'@'localhost';"

Set permissions:

chmod -R 777 templates uploads backup engine/data engine/cache

Open browser and complete installation via install.php.

After installation you can edit engine/data/dbconfig.php for fine-tuning:

nano /var/www/dle-site/engine/data/dbconfig.php

Main constants in dbconfig.php:

<?php
define('DBHOST', 'localhost');
define('DBNAME', 'dle_db');
define('DBUSER', 'dle_user');
define('DBPASS', 'your_password');
define('PREFIX', 'dle');
define('COLLATE', 'utf8mb4_general_ci');

These parameters are created by installer automatically.

Configuring .htaccess for URL Rewriting

DLE comes with ready-made .htaccess file, but it can be optimized.

Open .htaccess file:

nano /var/www/dle-site/.htaccess

Basic configuration for URL rewriting should already be in file. Check for:

RewriteEngine On
RewriteBase /

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,QSA]

Add protection from direct access to important directories (Apache 2.4):

# Deny access to engine/data (Apache 2.4)
<FilesMatch "\.dat$">
    Require all denied
</FilesMatch>

# Deny access to backup
<LocationMatch "^/backup/">
    Require all denied
</LocationMatch>

# Disable directory browsing
Options -Indexes

For Apache 2.2 use old syntax:

<Files ~ "\.dat$">
    Order allow,deny
    Deny from all
</Files>

RedirectMatch 403 ^/backup/
Options -Indexes

Save file.

Final Permission Setup After Installation

After installation completes, set secure permissions on config file:

chmod 600 /var/www/dle-site/engine/data/dbconfig.php

Remove installer files for security:

rm -f /var/www/dle-site/install.php
rm -f /var/www/dle-site/upgrade.php
rm -f /var/www/dle-site/update.php

Set permissions on critical directories:

chmod 755 /var/www/dle-site/engine/data
chmod 600 /var/www/dle-site/engine/data/*.php

Tighten permissions on uploads and other directories (if web upload/editing not required):

chmod -R 755 /var/www/dle-site/templates
chmod -R 755 /var/www/dle-site/backup
chmod -R 775 /var/www/dle-site/engine/cache
chmod -R 775 /var/www/dle-site/uploads

Important: if you edit templates via DLE admin panel, keep 777 permissions on templates. For normal site operation, it's usually sufficient for uploads and engine/cache to be writable by web server user (775).

Verifying Functionality

Check site homepage:

curl -I http://yourdomain.com/

Expected response:

HTTP/1.1 200 OK
Content-Type: text/html; charset=UTF-8

Check admin panel:

curl -I http://yourdomain.com/admin.php

Check Apache error logs:

sudo tail -f /var/log/apache2/dle-error.log

For Nginx:

sudo tail -f /var/log/nginx/dle-error.log

SSL Certificate Setup (Optional)

Install Certbot:

sudo apt install certbot python3-certbot-apache

For Nginx:

sudo apt install certbot python3-certbot-nginx

Obtain SSL certificate for Apache:

sudo certbot --apache -d yourdomain.com -d www.yourdomain.com

For Nginx:

sudo certbot --nginx -d yourdomain.com -d www.yourdomain.com

Check certificate auto-renewal:

sudo systemctl status certbot.timer

Troubleshooting Common Issues

Problem: "Internal Server Error" when opening site

Solution:

Check error logs:

sudo tail -50 /var/log/apache2/dle-error.log

Check .htaccess permissions:

ls -la /var/www/dle-site/.htaccess

Ensure rewrite module is enabled:

apache2ctl -M | grep rewrite

Problem: Database connection error

Solution:

Check if MySQL is running (on some systems service is called mariadb):

sudo systemctl status mysql

Or for MariaDB:

sudo systemctl status mariadb

Test database connection:

mysql -u dle_user -p dle_db -e "SELECT 1;"

Check credentials in dbconfig.php:

grep -E "DBHOST|DBNAME|DBUSER|DBPASS" /var/www/dle-site/engine/data/dbconfig.php

Problem: "Permission denied" when uploading files

Solution:

Check uploads permissions:

ls -la /var/www/dle-site/uploads

Set correct permissions:

sudo chown -R www-dаta:www-data /var/www/dle-site/uploads
chmod -R 775 /var/www/dle-site/uploads

Important: if issue persists, you can temporarily set chmod -R 777 for diagnostics, but always restore safe permissions (775 or 755) afterwards.

Problem: URL rewriting not working (404 errors)

Solution for Apache:

Check AllowOverride is set to All:

grep -r "AllowOverride" /etc/apache2/sites-available/dle-site.conf

Should be:

AllowOverride All

Check mod_rewrite is enabled:

apache2ctl -M | grep rewrite

Solution for Nginx:

Check try_files block in configuration:

grep "try_files" /etc/nginx/sites-available/dle-site

Should be:

try_files $uri $uri/ /index.php?$args;

Problem: White Screen of Death

Solution:

Enable error display temporarily:

nano /var/www/dle-site/index.php

Add at file beginning:

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

Check PHP logs:

sudo tail -f /var/log/php8.0-fpm.log

Check PHP limits:

php -i | grep -E "memory_limit|max_execution_time|upload_max_filesize"

PHP Optimization for DLE

Edit php.ini:

sudo nano /etc/php/8.0/apache2/php.ini

Recommended settings:

memory_limit = 256M
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 300
max_input_time = 300

For Nginx (PHP-FPM):

sudo nano /etc/php/8.0/fpm/php.ini

Restart web server after changes:

sudo systemctl restart apache2

Or for Nginx:

sudo systemctl restart php8.0-fpm
sudo systemctl restart nginx

Basic Security Setup

Prevent PHP execution in uploads:

nano /var/www/dle-site/uploads/.htaccess

Add (syntax for Apache 2.4):

<FilesMatch "\.php$">
    Require all denied
</FilesMatch>

For Apache 2.2 with mod_access_compat use:

<FilesMatch "\.php$">
    Order Deny,Allow
    Deny from all
</FilesMatch>

Verify config file permissions are not wider than 600:

ls -l /var/www/dle-site/engine/data/dbconfig.php

Disable PHP version in headers:

sudo nano /etc/php/8.0/apache2/php.ini

Find and change:

expose_php = Off

Quick DLE Installation Checklist

Step 1. Preparation:

cd /var/www
sudo mkdir dle-site && cd dle-site

Step 2. Download and extract:

wget -O dle.zip "https://your-download-link.com/dle.zip"
unzip dle.zip
mv Upload/* ./

Step 3. Database:

sudo mysql -u root -p
CREATE DATABASE dle_db CHARACTER SET utf8mb4;
CREATE USER 'dle_user'@'localhost' IDENTIFIED BY 'password';
GRANT ALL ON dle_db.* TO 'dle_user'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Step 4. Permissions:

find . -type d -exec chmod 755 {} \;
find . -type f -exec chmod 644 {} \;
chmod -R 777 uploads backup engine/cache templates engine/data
sudo chown -R www-dаta:www-data /var/www/dle-site

Important: 777 permissions are set temporarily for installation. After completing browser installation, be sure to perform final permission setup (see step 7).

Step 5. Web server configuration:

sudo nano /etc/apache2/sites-available/dle-site.conf
sudo a2enmod rewrite
sudo a2ensite dle-site.conf
sudo systemctl restart apache2

Step 6. Installation via browser:

http://yourdomain.com/install.php

Step 7. Final security:

rm -f install.php upgrade.php update.php
chmod 600 engine/data/dbconfig.php
chmod 755 engine/data
chmod -R 755 templates backup
chmod -R 775 engine/cache uploads

Note: after installation, be sure to tighten permissions according to "Final Permission Setup" section.

Conclusion

You've successfully installed DataLife Engine entirely via SSH command line. This method is faster and more reliable than traditional FTP installation, provides greater control over the process, and allows deployment automation.

Recommendations:

  • Regularly update DLE to latest version
  • Configure automatic database and file backups
  • Use SSL certificate to secure connection
  • Monitor logs for errors and intrusion attempts
  • Disable unused modules to improve security

Next steps:

  • Configure caching to speed up site
  • Install additional modules and templates
  • Set up backup automation
  • Optimize MySQL database

Other articles

15.12.2025
232
Knowledge base / Instructions
Installing Odoo with Docker on Ubuntu: Complete Guide
15.12.2025
215
Knowledge base / Automatic installation of scripts
How to Install Odoo on a VPS in Just a Few Minutes
15.12.2025
244
Knowledge base / Instructions
Files /etc/passwd and /etc/shadow: Structure and Operations