Era Host hosting
EraHost – Free Domain, Cheap Hosting!
Client Area
Support 24/7
Menu

Fix "No Language Defined" in VestaCP — VestaCP Not Recognizing Language

7 min read
11.09.2025

1. Check If Language Files Exist

First, verify that the VestaCP language files are present and accessible in the correct location.

VestaCP Not Recognizing Language
VestaCP language unrecognized — i18n lookup mismatch or permissions.

For closely related VestaCP language topics, see VestaCP — Missing Language Files and "No Language Defined" Error in VestaCP.

Check Language Directory Contents

ls -lah /usr/local/vesta/web/lang/

Expected Output

A healthy VestaCP installation should show:

total 48K
drwxr-xr-x  2 root root 4.0K Mar 10 10:30 .
drwxr-xr-x 12 root root 4.0K Mar 10 10:30 ..
-rw-r--r--  1 root root  22K Mar 10 10:30 ar.php
-rw-r--r--  1 root root  22K Mar 10 10:30 de.php
-rw-r--r--  1 root root  22K Mar 10 10:30 en.php
-rw-r--r--  1 root root  22K Mar 10 10:30 es.php
-rw-r--r--  1 root root  22K Mar 10 10:30 fr.php
-rw-r--r--  1 root root  22K Mar 10 10:30 it.php
-rw-r--r--  1 root root  22K Mar 10 10:30 nl.php
-rw-r--r--  1 root root  22K Mar 10 10:30 pl.php
-rw-r--r--  1 root root  22K Mar 10 10:30 pt.php
-rw-r--r--  1 root root  22K Mar 10 10:30 ru.php
-rw-r--r--  1 root root  22K Mar 10 10:30 tr.php
-rw-r--r--  1 root root  22K Mar 10 10:30 uk.php

Additional Diagnostic Checks

Verify Specific Language File Integrity

# Check if English language file exists and is valid PHP
head -5 /usr/local/vesta/web/lang/en.php

# Check file sizes (should be similar, not 0 bytes)
ls -lh /usr/local/vesta/web/lang/*.php | awk '{print $5, $9}' | sort

# Count number of language files
ls /usr/local/vesta/web/lang/*.php 2>/dev/null | wc -l

If no files are listed, the directory is empty, or files show 0 bytes, you need to restore them (see Step 4).

2. Fix File Permissions and Ownership

If the files exist but VestaCP cannot read them, incorrect permissions are likely the issue.

Set Correct Ownership

Fix Ownership of Language Directory

# Set root ownership recursively
sudo chown -R root:root /usr/local/vesta/web/lang/

# Verify ownership change
ls -ld /usr/local/vesta/web/lang/
ls -la /usr/local/vesta/web/lang/ | head -5

Set Correct File Permissions

Apply Proper Permissions

# Standard permissions for web-accessible files
sudo chmod -R 755 /usr/local/vesta/web/lang/

# Alternative: More precise permission setting
sudo find /usr/local/vesta/web/lang/ -type d -exec chmod 755 {} \;
sudo find /usr/local/vesta/web/lang/ -type f -exec chmod 644 {} \;

Check Web Server Access

# Determine web server user
ps aux | grep -E "(apache|httpd|nginx)" | grep -v grep | head -1

# Test if web server can read language files
sudo -u www-data ls -la /usr/local/vesta/web/lang/en.php 2>/dev/null || \
sudo -u apache ls -la /usr/local/vesta/web/lang/en.php 2>/dev/null || \
sudo -u nginx ls -la /usr/local/vesta/web/lang/en.php 2>/dev/null
Web Server User Guide:
  • Debian/Ubuntu with Apache: www-data
  • CentOS/RHEL with Apache: apache
  • Nginx (most distributions): nginx or www-data
  • Permissions 755 on directories allow the web server user (group/others) to enter and read
  • Permissions 644 on files allow the web server user to read but not modify

Restart VestaCP

# Restart VestaCP service
sudo systemctl restart vesta

# Check service status
sudo systemctl status vesta --no-pager -l

After restarting, check if VestaCP now recognizes the language.

Linux VDS
High performance for your projects
  • Root access and flexible setup
  • Control panel
  • NVMe disks
  • DDR5
Linux VDS

3. Set the Correct Language in VestaCP Configuration

If permissions are fine but VestaCP still doesn't recognize the language, check the system configuration.

Edit VestaCP Configuration File

Open VestaCP Main Configuration

sudo nano /usr/local/vesta/conf/vesta.conf

Check or Set LANGUAGE Variable

Look for the LANGUAGE setting. It should look like:

# Language settings
LANGUAGE='en'

If missing, add it to the configuration file. The complete configuration might include:

# Vesta Control Panel configuration
VERSION='0.9.8'
LANGUAGE='en'
THEME='dark'
DEBUG='no'
BACKUP_GZIP='9'
BACKUP_MODE='local'
BACKUP_SYSTEM='yes'
STATS='yes'
STATS_USER='admin'
Configuration Syntax: Ensure there are no spaces around the equals sign and the language code is in single quotes. Valid language codes correspond to the file names in the lang directory (e.g., 'en', 'ru', 'de', 'fr').

Save and Restart VestaCP

# Save the configuration file (in nano: Ctrl+O, Enter, Ctrl+X)

# Restart VestaCP to apply changes
sudo systemctl restart vesta

# Also restart web server for good measure
sudo systemctl restart apache2   # or httpd, or nginx

Check User-Specific Language Settings

# Check if user has language preference set
sudo grep -r "LANGUAGE" /usr/local/vesta/data/users/*/user.conf 2>/dev/null | head -5

# Reset a user's language to default
sudo sed -i "s/LANGUAGE='.*'/LANGUAGE='en'/" /usr/local/vesta/data/users/admin/user.conf

4. Restore Missing Language Files

If the language directory is empty or corrupted, download and restore fresh language files.

Download the Language Pack from GitHub

Clone VestaCP Repository for Language Files

# Navigate to VestaCP web directory
cd /usr/local/vesta/web/

# Clone the VestaCP repository (language files are included)
sudo git clone https://github.com/serghey-rodin/vesta.git vesta-lang

# Check what was downloaded
ls -la vesta-lang/web/lang/ | head -10
Git Installation Required: If git is not installed, install it first:
# Debian/Ubuntu
sudo apt update && sudo apt install git -y

# CentOS/RHEL
sudo yum install git -y

Alternative: Download via wget (No Git Required)

# Download and extract VestaCP archive
cd /tmp
sudo wget https://github.com/serghey-rodin/vesta/archive/master.tar.gz
sudo tar -xzf master.tar.gz

# Copy language files
sudo cp -r vesta-master/web/lang/ /usr/local/vesta/web/

# Clean up temporary files
sudo rm -rf vesta-master master.tar.gz

Copy Language Files to Correct Location

Backup and Replace Language Files

# Backup existing language files (if any)
sudo mv /usr/local/vesta/web/lang/ /usr/local/vesta/web/lang_backup_$(date +%Y%m%d_%H%M%S) 2>/dev/null || true

# Create fresh language directory
sudo mkdir -p /usr/local/vesta/web/lang/

# Copy downloaded language files
sudo cp -r vesta-lang/web/lang/* /usr/local/vesta/web/lang/

# Set correct permissions immediately
sudo chown -R root:root /usr/local/vesta/web/lang/
sudo chmod -R 755 /usr/local/vesta/web/lang/

Remove Temporary Files

# Clean up cloned repository
sudo rm -rf vesta-lang

# Verify language files are restored
ls -la /usr/local/vesta/web/lang/ | wc -l
ls -la /usr/local/vesta/web/lang/*.php | head -5

Final Restart

# Restart VestaCP service
sudo systemctl restart vesta

# Restart web server
sudo systemctl restart apache2   # or nginx, or httpd

# Check if service started successfully
sudo systemctl status vesta --no-pager | head -20

Now log in to VestaCP and check if the language is working correctly!

5. Summary of Fixes

Issue Fix Command to Use
Language files missing Restore from GitHub repository git clone https://github.com/serghey-rodin/vesta.git
Incorrect file permissions Set proper read permissions chmod -R 755 /usr/local/vesta/web/lang/
Wrong ownership Set root ownership chown -R root:root /usr/local/vesta/web/lang/
Language not set in VestaCP Configure in vesta.conf Set LANGUAGE='en' in /usr/local/vesta/conf/vesta.conf
Corrupted language files Replace with fresh copies cp -r vesta-lang/web/lang/ /usr/local/vesta/web/
VestaCP not recognizing changes Restart VestaCP service systemctl restart vesta
Web server permissions issue Ensure web server user can read files Check with sudo -u www-data ls /usr/local/vesta/web/lang/
User-specific language setting Reset user configuration Edit /usr/local/vesta/data/users/username/user.conf

By systematically addressing these potential causes, you should be able to resolve the "No Language Defined" error and restore full language functionality to your Vesta Control Panel!

Frequently asked questions
VestaCP language codes are 2-letter (en, ru, de) — not BCP47 (en-US, ru-RU). If user.conf has `LANGUAGE='en-US'`, VestaCP looks for `en-US.php` which doesn't exist. Fix: simplify to 2-letter code or rename language file to match.
Mode 644 is fine; owner matters. VestaCP web runs as the system user — usually `admin` or `vesta`. If files are owned by a different user and mode is 600, web can't read. `ls -la /usr/local/vesta/web/inc/i18n/` shows ownership; chown if needed.
VestaCP's nginx may cache the i18n directory listing. Restart Vesta: `systemctl restart vesta-nginx vesta-php`. After restart, the i18n re-scan picks up new files. Browser cache also; hard refresh (Ctrl+Shift+R) after server restart.
Older VestaCP versions had hardcoded language lists in the UI templates. Custom language file exists but dropdown doesn't show. Workaround: edit the user's user.conf to set LANGUAGE directly to the new code; UI will load that language but dropdown won't display it. Real fix: edit the templates to include your language.
Related articles
Fixing "No Language Defined" Error in VestaCP
Fixing "No Language Defined" in VestaCP — Missing Language Files
Fixing session_start(): Permission Denied (13) in XAMPP — System Administrator's Guide