Why Plesk?
Plesk is one of the most widely-used commercial hosting control panels, powering over 380,000 servers worldwide. It provides a web-based interface for managing web hosting services on Linux and Windows servers.
Initial Server Hardening
Before anything else, secure your Plesk installation:
# Update Plesk to the latest version
plesk installer update
# Enable automatic security updates
plesk bin server_pref -u -autoupdates true
# Restrict admin access by IP
plesk bin ip_ban --add-trusted 203.0.113.50
# Enable Fail2Ban integration
plesk bin ip_ban --enable
plesk bin ip_ban --ban-time 3600 --max-retries 5
# Force HTTPS for Plesk panel
plesk bin admin --set-admin-ssl true
Essential CLI Commands
# Domain management
plesk bin domain --list
plesk bin domain --create example.com -ip 93.184.216.34 \
-login admin -passwd SecureP@ss
# Subscription management
plesk bin subscription --list
plesk bin subscription --info example.com
# Database operations
plesk bin database --list --domain example.com
plesk bin database --create mydb -domain example.com \
-type mysql -server localhost
# SSL/TLS certificate management
plesk bin extension --exec letsencrypt cli.php \
-d example.com -d www.example.com
# Backup and restore
plesk bin pleskbackup domains-only --output-file /backup/domains.tar
plesk bin pleskrestore --restore /backup/domains.tar
Performance Optimization
PHP-FPM Configuration
# Per-domain PHP-FPM settings
plesk bin domain -u example.com \
-php_handler_id plesk-php83-fpm
# Tune FPM pool settings via Plesk UI or directly:
# /opt/plesk/php/8.3/etc/php-fpm.d/
pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 500
Nginx Caching
# Enable nginx caching per-domain
# In Plesk: Domains > example.com > Apache & nginx Settings
# Add to Additional nginx directives:
proxy_cache_path /var/cache/nginx levels=1:2
keys_zone=example:10m max_size=1g inactive=60m;
location ~* \.(css|js|jpg|jpeg|png|gif|ico|svg|woff2)$ {
expires 30d;
add_header Cache-Control "public, immutable";
}
Monitoring and Maintenance
# Check service status
plesk bin service --status-all
# View Plesk logs
tail -f /var/log/plesk/panel.log
tail -f /var/log/sw-cp-server/error_log
# Repair permissions
plesk repair fs -y
plesk repair web -y
# Database integrity check
plesk repair db -y
Plesk is a powerful tool when configured correctly. These fundamentals will serve as your foundation for running a secure, performant hosting infrastructure.
Share this article