Change Maximum Upload File Size in OpenLiteSpeed / LiteSpeed
How to increase the file upload limit for sites running on OpenLiteSpeed or LiteSpeed web servers.
Method 1 — Edit php.ini
# Find the active php.ini
/usr/local/lsws/lsphp81/bin/php --ini | grep "Loaded Configuration"
# Edit php.ini
nano /usr/local/lsws/lsphp81/etc/php/8.1/litespeed/php.ini
Update these values:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
max_execution_time = 300
Method 2 — Edit .user.ini (Per-site)
# Create or edit .user.ini in the web root
nano /home/example.com/public_html/.user.ini
# Add:
upload_max_filesize = 256M
post_max_size = 256M
memory_limit = 512M
Method 3 — Via OpenLiteSpeed Admin Console
- Login to OpenLiteSpeed Admin at
https://server-ip:7080 - Go to Server Configuration → General
- Scroll to PHP section and set upload limits
- Click Save and perform a graceful restart
Restart OpenLiteSpeed
systemctl restart lsws
Verify
# Check with a phpinfo() page or:
/usr/local/lsws/lsphp81/bin/php -i | grep upload_max