Ensure optimal performance and functionality of NexlifyDesk by configuring your server environment with the proper PHP settings, memory limits, and file upload capabilities.
Ensure optimal performance and functionality of NexlifyDesk by configuring your server environment with the proper PHP settings, memory limits, and file upload capabilities.
Configure these settings BEFORE installing NexlifyDesk to avoid “413 Request Entity Too Large” errors and ensure smooth operation with file uploads and ticket processing.
NexlifyDesk requires specific server configurations to handle support tickets efficiently, manage file attachments, and process email piping without performance issues.
Before making changes, verify your current PHP configuration to understand what needs to be adjusted.
phpinfo.php
in your website root directory.<?php
phpinfo();
?>
yourwebsite.com/phpinfo.php
in your browser.memory_limit
upload_max_filesize
post_max_size
max_execution_time
max_input_time
phpinfo.php
file after checking.memory_limit
upload_max_filesize
post_max_size
max_execution_time
max_input_time
These PHP settings must be configured to prevent errors and ensure optimal performance:
Setting | Minimum Value | Recommended Value | Purpose |
---|---|---|---|
memory_limit |
128M | 512M | Prevents memory exhaustion during ticket processing |
upload_max_filesize |
10M | 100M | Maximum size for individual file attachments |
post_max_size |
10M | 100M | Maximum total size for all uploaded files in one request |
max_execution_time |
30 | 60 | Prevents timeout during email processing and large uploads |
max_input_time |
30 | 60 | Time limit for parsing uploaded files |
max_input_vars |
1000 | 3000 | Handles complex forms with many fields |
For shared hosting environments, you have several options to modify PHP settings:
Create or edit the .htaccess
file in your WordPress root directory:
# NexlifyDesk PHP Configuration
php_value memory_limit 512M
php_value upload_max_filesize 100M
php_value post_max_size 100M
php_value max_execution_time 60
php_value max_input_time 60
php_value max_input_vars 3000
Create a php.ini
file in your WordPress root directory:
memory_limit = 512M
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 60
max_input_time = 60
max_input_vars = 3000
cPanel:
Plesk:
For servers running Nginx with PHP-FPM, you need to configure both PHP and Nginx:
# Edit PHP configuration for FPM
sudo nano /etc/php/8.2/fpm/php.ini
# Make the same changes as shown above:
memory_limit = 512M
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 60
max_input_time = 60
max_input_vars = 3000
# Restart PHP-FPM for your PHP version
sudo systemctl restart php8.1-fpm
sudo systemctl restart php8.2-fpm
sudo systemctl restart php8.3-fpm
sudo systemctl restart php8.4-fpm
# Check PHP-FPM status
sudo systemctl status php8.2-fpm
Edit your Nginx site configuration file:
# Edit your site configuration
sudo nano /etc/nginx/sites-available/your-site
# OR for default site
sudo nano /etc/nginx/sites-available/default
Add or modify the client_max_body_size
directive:
server {
listen 80; # or 443 for SSL
server_name your-domain.com;
root /var/www/wordpress;
# Set maximum upload size
client_max_body_size 100M; # <--- Add this line
# PHP processing
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php8.2-fpm.sock;
fastcgi_read_timeout 60s; # <--- Add this for longer processing
}
# Other configurations...
}
# Test Nginx configuration
sudo nginx -t
# If test passes, restart Nginx
sudo systemctl restart nginx
# Check Nginx status
sudo systemctl status nginx
You can also add client_max_body_size 100M;
to:
/etc/nginx/nginx.conf
(applies globally)/etc/nginx/sites-available/your-site
(recommended)For VPS or dedicated servers running Apache, modify the PHP configuration files directly:
# Find your PHP version
php -v
# Edit PHP configuration (adjust version as needed)
sudo nano /etc/php/8.2/apache2/php.ini
# For PHP-FPM (if using)
sudo nano /etc/php/8.2/fpm/php.ini
Find and update these lines in the php.ini file:
memory_limit = 512M
upload_max_filesize = 100M
post_max_size = 100M
max_execution_time = 60
max_input_time = 60
max_input_vars = 3000
; Enable required extensions
extension=imap
extension=mysqli
extension=gd
# Restart Apache web server
sudo systemctl restart apache2
# Check Apache status
sudo systemctl status apache2
# Edit PHP configuration
sudo nano /etc/php.ini
# Restart Apache
sudo systemctl restart httpd
# Check status
sudo systemctl status httpd
Additional optimizations for high-traffic support systems:
# Add to php.ini
opcache.enable=1
opcache.enable_cli=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=8
opcache.max_accelerated_files=10000
opcache.revalidate_freq=2
opcache.fast_shutdown=1
# Add to /etc/mysql/mysql.conf.d/mysqld.cnf
[mysqld]
innodb_buffer_pool_size = 256M
max_allowed_packet = 100M
query_cache_size = 64M
query_cache_type = 1
After making changes, verify that your settings have been applied correctly:
Create a new phpinfo.php
file and verify the settings show your new values.
Go to Tools > Site Health > Info
Expand the Server section
Verify the PHP limits match your configuration.
After installing NexlifyDesk:
Go to NexlifyDesk > Settings
Check the file upload limits in the interface
Test file uploads to ensure they work.
After making changes, verify that your settings have been applied correctly:
Cause:
Nginx client_max_body_size
is too small
Solution:
client_max_body_size 100M;
to your Nginx configurationsudo systemctl restart nginx
Cause:
PHP upload limits are too low
Solution:
upload_max_filesize
and post_max_size
post_max_size ≥ upload_max_filesize
Cause:
Script timeout during email processing or large uploads
Solution:
max_execution_time
to 60 or higherfastcgi_read_timeout 60s;
Possible Causes:
Solutions:
php --ini
to find the correct php.iniOnce your server is properly configured, you can:
After configuration:
Subscribe to our newsletter and never miss our latest updates, tips, and exclusive content.
Discover powerful WordPress plugins at NexlifyLabs.
Resources
© 2025 NexlifyLabs. All rights reserved.