{"id":13737,"date":"2026-03-11T10:45:07","date_gmt":"2026-03-11T05:15:07","guid":{"rendered":"https:\/\/www.youstable.com\/blog\/?p=13737"},"modified":"2026-03-02T11:35:11","modified_gmt":"2026-03-02T06:05:11","slug":"how-to-optimize-directadmin-on-linux-server","status":"publish","type":"post","link":"https:\/\/www.youstable.com\/blog\/how-to-optimize-directadmin-on-linux-server","title":{"rendered":"How to Optimize DirectAdmin on Linux Server &#8211; Easy Guide"},"content":{"rendered":"\n<p><strong>To optimize DirectAdmin on a Linux server<\/strong>, update your stack with CustomBuild, switch to a modern web server and PHP-FPM, tune PHP, MySQL (MariaDB), and the kernel, enable caching (OPcache\/Redis), harden with CSF and ModSecurity, and monitor resource usage. Back up first, test changes incrementally, and automate routine maintenance.<\/p>\n\n\n\n<p>DirectAdmin is a lightweight, reliable control panel, but it needs smart tuning to reach peak performance and security. In this guide, I\u2019ll show you how to optimize DirectAdmin on Linux server environments the way we do it for production sites, clean, safe, and measurable.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"what-is-directadmin-optimization-and-why-it-matters\">What Is DirectAdmin Optimization and Why It Matters<\/h2>\n\n\n\n<p>Optimization means configuring your OS, web stack, database, mail, DNS, and DirectAdmin services to reduce latency, handle more concurrent traffic, and stay secure. Done right, you\u2019ll see faster PHP response times, lower <a href=\"https:\/\/www.youstable.com\/blog\/fix-high-cpu-usage-on-vps-servers\/\">CPU and RAM usage<\/a>, fewer 5xx errors, and smoother email deliverability.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"prerequisites-and-safety-first\">Prerequisites and Safety First<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"check-your-environment\">Check Your Environment<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><a href=\"https:\/\/www.youstable.com\/blog\/configure-directadmin-on-linux\/\">Linux<\/a> distro: <\/strong>AlmaLinux\/Rocky, CentOS Stream, Debian, or Ubuntu LTS<\/li>\n\n\n\n<li>DirectAdmin with CustomBuild 2.x<\/li>\n\n\n\n<li>Root or sudo access<\/li>\n\n\n\n<li>Minimum 2 CPU cores, 4\u20138 GB RAM for small multi site hosting<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"backups-and-staging\">Backups and Staging<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a full snapshot or image level backup.<\/li>\n\n\n\n<li>Use DirectAdmin &gt; Admin Backup\/Transfer for accounts and configs.<\/li>\n\n\n\n<li>Apply changes during a maintenance window or on a staging server first.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"update-the-stack-and-establish-a-baseline\">Update the Stack and Establish a Baseline<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"system-and-custombuild-updates\">System and CustomBuild Updates<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># OS packages\nsudo dnf -y update || sudo apt -y update &amp;&amp; sudo apt -y upgrade\n\n# DirectAdmin CustomBuild\ncd \/usr\/local\/directadmin\/custombuild\n.\/build update\n.\/build versions\n<\/code><\/pre>\n\n\n\n<p>Keep PHP on a currently supported branch (8.2\/8.3), Apache 2.4 with MPM Event, or consider OpenLiteSpeed for high concurrency. Always enable OPcache.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"select-the-right-web-stack\">Select the Right Web Stack<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Nginx as reverse proxy + Apache (nginx_apache): balanced, widely compatible.<\/li>\n\n\n\n<li>Apache only (apache): simple, fine for low traffic.<\/li>\n\n\n\n<li>OpenLiteSpeed (openlitespeed): fast and efficient, easy HTTP\/3; great for WordPress.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/directadmin\/custombuild\n# Example: Nginx reverse proxy + Apache + PHP-FPM + OPcache\n.\/build set webserver nginx_apache\n.\/build set php1_release 8.2\n.\/build set php1_mode php-fpm\n.\/build set opcache yes\n.\/build set modsecurity yes\n.\/build set modsecurity_ruleset owasp\n.\/build all d\n.\/build rewrite_confs\n<\/code><\/pre>\n\n\n\n<p>If you choose OpenLiteSpeed, set webserver to <code>openlitespeed<\/code> and rebuild. Test site functionality after switching.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"web-server-and-php-optimization\">Web Server and PHP Optimization<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"php-fpm-pool-tuning\">PHP-FPM Pool Tuning<\/h3>\n\n\n\n<p>Each DirectAdmin user or domain can have its own PHP-FPM pool. Size pools to avoid CPU thrash or memory exhaustion. Estimate <em>pm.max_children<\/em> using RAM\/avg PHP process size (often 60\u201390 MB for WordPress).<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>; Example: \/usr\/local\/php72\/etc\/php-fpm.d\/user.domain.conf\n&#91;domain.com]\nuser = domain\ngroup = domain\nlisten = \/usr\/local\/php56\/var\/run\/domain.sock\npm = dynamic\npm.max_children = 20\npm.start_servers = 4\npm.min_spare_servers = 4\npm.max_spare_servers = 8\npm.max_requests = 500\npm.process_idle_timeout = 10s\n; Adjust per user based on traffic and RAM\n<\/code><\/pre>\n\n\n\n<p><strong>For many small sites, <code>pm =<\/code><\/strong><code> ondemand<\/code> with conservative limits reduces idle memory. <br><strong>For<\/strong> <strong>busy sites, <code>pm =<\/code><\/strong><code> dynamic<\/code> offers more consistent latency.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"opcache-settings-for-fast-php\">OPcache Settings for Fast PHP<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>; php.ini or \/usr\/local\/php*\/lib\/php.ini\nopcache.enable=1\nopcache.memory_consumption=192\nopcache.interned_strings_buffer=16\nopcache.max_accelerated_files=100000\nopcache.validate_timestamps=1\nopcache.revalidate_freq=60\nopcache.save_comments=1\n<\/code><\/pre>\n\n\n\n<p>Increase <code>opcache.memory_consumption<\/code> if you host many sites. Restart PHP-FPM after changes.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"nginx-reverse-proxy-tweaks-if-using-nginx_apache\">Nginx Reverse Proxy Tweaks (if using nginx_apache)<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.youstable.com\/blog\/how-to-enable-gzip-compression-in-wordpress\/\">Enable gzip<\/a> for text assets.<\/li>\n\n\n\n<li>Cache static files with far future <a href=\"https:\/\/www.youstable.com\/blog\/how-to-add-expires-headers\/\">expires headers<\/a>.<\/li>\n\n\n\n<li>Serve HTTP\/2 on TLS listeners.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># \/etc\/nginx\/nginx.conf (snippet)\ngzip on;\ngzip_comp_level 5;\ngzip_types text\/plain text\/css application\/javascript application\/json image\/svg+xml;\n\n# Example SSL server block directive\nlisten 443 ssl http2;\n<\/code><\/pre>\n\n\n\n<p>For HTTP\/3, OpenLiteSpeed is the easiest path in DirectAdmin. Enable QUIC\/HTTP\/3 in the OLS listener and restart.<\/p>\n\n\n\n<p class=\"has-ast-global-color-1-background-color has-background\"><strong>Also Read: <a href=\"https:\/\/www.youstable.com\/blog\/fix-mongodb-on-linux\">How to Fix MongoDB on Linux Server Without Losing Data<\/a><\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"database-mariadb-mysql-optimization\">Database (MariaDB\/MySQL) Optimization<\/h2>\n\n\n\n<p>Tune MariaDB based on RAM and workload. Focus on InnoDB buffer pool and log file size. Avoid legacy Query Cache on modern MariaDB.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \/etc\/my.cnf.d\/server.cnf or \/etc\/mysql\/mariadb.conf.d\/50-server.cnf\n&#91;mysqld]\n# Example for 8 GB RAM server hosting WordPress\ninnodb_buffer_pool_size = 4G\ninnodb_log_file_size    = 1G\ninnodb_flush_log_at_trx_commit = 2\ninnodb_flush_method     = O_DIRECT\nmax_connections         = 200\ntmp_table_size          = 256M\nmax_heap_table_size     = 256M\nthread_cache_size       = 100\ntable_open_cache        = 4000\nperformance_schema      = ON\nslow_query_log          = 1\nslow_query_log_file     = \/var\/log\/mysql-slow.log\nlong_query_time         = 1\n<\/code><\/pre>\n\n\n\n<p>Restart MariaDB after editing, then run a workload for a day and analyze slow queries. Use <code>mysqltuner<\/code> and <code>pt-query-digest<\/code> to refine settings and index heavy queries.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo mysqltuner\nsudo apt install percona-toolkit || sudo dnf install percona-toolkit\npt-query-digest \/var\/log\/mysql-slow.log | less\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"mail-dns-and-essential-services\">Mail, DNS, and Essential Services<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"email-stack-exim-dovecot-and-spam-control\">Email Stack (Exim\/Dovecot) and Spam Control<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use Maildir, not mbox (DirectAdmin defaults to Maildir).<\/li>\n\n\n\n<li>Enable SpamAssassin or Rspamd via CustomBuild (Rspamd is lighter and more accurate).<\/li>\n\n\n\n<li>Limit concurrent SMTP connections to protect CPU\/RAM.<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># Enable Rspamd in CustomBuild\ncd \/usr\/local\/directadmin\/custombuild\n.\/build set exim yes\n.\/build set dovecot yes\n.\/build set spamassassin no\n.\/build set rspamd yes\n.\/build rspamd d\n.\/build rewrite_confs\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"dkim-spf-and-dmarc\">DKIM, SPF, and DMARC<\/h3>\n\n\n\n<p>From DirectAdmin &gt; DNS Management, enable DKIM and create SPF and DMARC records for each domain. This improves deliverability and reputation.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"dns-performance-powerdns\">DNS Performance: PowerDNS<\/h3>\n\n\n\n<p>PowerDNS is faster and uses fewer resources than BIND for most hosting cases.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd \/usr\/local\/directadmin\/custombuild\n.\/build set powerdns yes\n.\/build set bind no\n.\/build powerdns d\n.\/build rewrite_confs\n<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"caching-and-acceleration\">Caching and Acceleration<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"redis-object-cache\">Redis Object Cache<\/h3>\n\n\n\n<p><a href=\"https:\/\/www.youstable.com\/blog\/how-to-install-wordpress-in-directadmin-using-softaculous\/\">Install Redis and use it for WordPress<\/a> object caching. It reduces database load and improves time to first byte.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># <a href=\"https:\/\/www.youstable.com\/blog\/install-redis-on-linux\/\">Install Redis server<\/a>\nsudo dnf -y install redis || sudo apt -y install redis\nsudo systemctl enable --now redis\n\n# In PHP, install redis extension via CustomBuild\ncd \/usr\/local\/directadmin\/custombuild\n.\/build set redis yes\n.\/build redis d\n<\/code><\/pre>\n\n\n\n<p>Use a reputable plugin (e.g., \u201cRedis Object Cache\u201d) and set a unique prefix per site. For WooCommerce, enable session locking.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"static-assets-and-cdn\">Static Assets and CDN<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.youstable.com\/blog\/fix-leverage-browser-caching\/\">Leverage browser caching<\/a> for images, CSS, JS.<\/li>\n\n\n\n<li>Serve WebP\/AVIF where possible.<\/li>\n\n\n\n<li>Offload large assets and use a CDN to shrink TTFB globe wide.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"security-hardening-without-losing-performance\">Security Hardening Without Losing Performance<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"csf-lfd-firewall\">CSF\/LFD Firewall<\/h3>\n\n\n\n<p>ConfigServer Security &amp; Firewall (CSF) integrates well with DirectAdmin. Whitelist your IPs, rate limit login attempts, and block abusive ports.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Basic CSF workflow\ncsf -e                # enable\ncsf -a YOUR_IP        # allowlist admin IP\ncsf -g 1.2.3.4        # grep IP status\ncsf -t                # view temp bans\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"modsecurity-owasp-crs-and-exclusions\">ModSecurity (OWASP CRS) and Exclusions<\/h3>\n\n\n\n<p>Enable ModSecurity with the OWASP ruleset via CustomBuild, then add rule exclusions for legitimate apps when false positives occur. Monitor your Apache\/Nginx error logs to identify blocked requests.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"lets-encrypt-tls-1-2-1-3-and-ecdsa\">Let\u2019s Encrypt, TLS 1.2\/1.3, and ECDSA<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use <a href=\"https:\/\/www.youstable.com\/blog\/what-is-lets-encrypt-on-linux-server\/\">Let\u2019s Encrypt<\/a> automation in DirectAdmin.<\/li>\n\n\n\n<li>Prefer ECDSA certificates for performance (if clients support it).<\/li>\n\n\n\n<li>Disable TLS 1.0\/1.1; enforce strong ciphers.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"ssh-hardening\">SSH Hardening<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Move SSH from port 22 (optional), allow only key auth, and disable root login if your workflow allows.<\/li>\n\n\n\n<li><a href=\"https:\/\/www.youstable.com\/blog\/install-fail2ban-on-linux\/\">Install fail2ban<\/a> if you\u2019re not using LFD\u2019s SSH protection.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"system-level-tuning-kernel-and-limits\">System Level Tuning (Kernel and Limits)<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"etc-sysctl-conf-optimizations\">\/etc\/sysctl.conf Optimizations<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># \/etc\/sysctl.d\/99-directadmin-tuning.conf\nfs.file-max = 2097152\nnet.core.somaxconn = 65535\nnet.ipv4.tcp_fin_timeout = 15\nnet.ipv4.tcp_syncookies = 1\nnet.ipv4.ip_local_port_range = 10240 65535\nvm.swappiness = 10\nfs.inotify.max_user_watches = 1048576\n\n# apply\nsudo sysctl --system\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"file-descriptors-and-systemd-overrides\">File Descriptors and Systemd Overrides<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Example for Nginx\/Apache\/MariaDB\nsudo systemctl edit nginx\n# then add:\n# &#91;Service]\n# LimitNOFILE=1048576\n\nsudo systemctl daemon-reload\nsudo systemctl restart nginx\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"logs-and-rotation\">Logs and Rotation<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure logrotate is active for Apache\/Nginx, PHP-FPM, Exim, Dovecot, and <a href=\"https:\/\/www.youstable.com\/blog\/mysql-commands\">MySQL<\/a> logs.<\/li>\n\n\n\n<li>Limit journald size to prevent disk pressure (<code>\/etc\/systemd\/journald.conf<\/code>).<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"monitoring-and-troubleshooting\">Monitoring and Troubleshooting<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"find-bottlenecks-quickly\">Find Bottlenecks Quickly<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># CPU\/RAM\nhtop\natop\n\n# Disk I\/O\niotop -oPa\n\n# Network\nss -tulpn\n\n# Web errors\ntail -f \/var\/log\/httpd\/error_log       # Apache (path may vary)\ntail -f \/var\/log\/nginx\/error.log       # Nginx\n\n# PHP-FPM\njournalctl -u php-fpm --since \"10 min ago\"\n\n# Mail\ntail -f \/var\/log\/exim\/mainlog\n<\/code><\/pre>\n\n\n\n<p><strong>Turn on MySQL <\/strong>slow query log and fix the top offenders. For WordPress, use Query Monitor to spot heavy plugins or themes.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"automation-backups-and-safe-updates\">Automation, Backups, and Safe Updates<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"directadmin-admin-backup-transfer\">DirectAdmin Admin Backup\/Transfer<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Schedule daily account backups with remote storage (SFTP\/FTP\/S3 via rclone).<\/li>\n\n\n\n<li>Use incremental rsync for large datasets.<\/li>\n\n\n\n<li>Test restores quarterly to ensure integrity.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"keep-a-controlled-update-cadence\">Keep a Controlled Update Cadence<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Apply OS security updates weekly.<\/li>\n\n\n\n<li>Update <a href=\"https:\/\/www.youstable.com\/blog\/how-to-change-php-version-in-cpanel\/\">PHP minor versions<\/a> promptly; test major upgrades.<\/li>\n\n\n\n<li>Track CustomBuild versions and rebuild services after changes.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"quick-wins-and-common-pitfalls\">Quick Wins and Common Pitfalls<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Enable OPcache and PHP-FPM:<\/strong> easy speed boost.<\/li>\n\n\n\n<li><strong>Right size PHP-FPM pools:<\/strong> prevents \u201cOut of memory\u201d and 502s.<\/li>\n\n\n\n<li>Use Redis for WordPress object cache: trims database load.<\/li>\n\n\n\n<li>Avoid enabling every ModSecurity rule; tune for your apps.<\/li>\n\n\n\n<li>Don\u2019t oversubscribe swap; watch iowait and disk health.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity is-style-wide\"\/>\n\n\n\n<h2 class=\"wp-block-heading\" class=\"wp-block-heading\" id=\"faqs\">FAQs<\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1765872844258\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"what-is-the-best-web-stack-for-directadmin-performance\">What is the best web stack for DirectAdmin performance?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>For general hosting, Nginx reverse proxy + Apache + PHP-FPM is a great balance. For maximum performance and simpler HTTP\/3 support, OpenLiteSpeed performs exceptionally well, especially for WordPress. Always enable OPcache and size PHP-FPM pools appropriately.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765872853052\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-do-i-speed-up-php-in-directadmin\">How do I speed up PHP in DirectAdmin?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Use PHP-FPM (not CGI), enable OPcache with enough memory, upgrade to PHP 8.2\/8.3, and tune <code>pm.max_children<\/code> based on RAM and average PHP process size. For dynamic sites, add Redis object cache to reduce database calls.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765872859952\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"how-should-i-tune-mariadb-for-multiple-wordpress-sites\">How should I tune MariaDB for multiple WordPress sites?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Start with InnoDB buffer pool around 50\u201370% of RAM, set <code>innodb_log_file_size<\/code> to 512M\u20131G, keep <code>performance_schema<\/code> ON for visibility, enable slow query logging, and iterate with <code>mysqltuner<\/code> and <code>pt-query-digest<\/code>. Use Redis object cache at the app layer.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765872866736\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"is-modsecurity-necessary-if-i-use-a-cdn-waf\">Is ModSecurity necessary if I use a CDN\/WAF?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p><strong>Yes<\/strong>, a local WAF like ModSecurity adds protection when CDN\/WAF rules miss or when requests bypass the CDN. Use OWASP CRS as a baseline and create exclusions for known safe patterns to keep false positives low and performance healthy.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1765872878985\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \" class=\"rank-math-question \" id=\"can-i-enable-http-3-quic-on-directadmin\">Can I enable HTTP\/3 (QUIC) on DirectAdmin?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p><strong>Yes<\/strong>. The most straightforward route is OpenLiteSpeed in DirectAdmin, which supports HTTP\/3 with simple listener settings. Nginx can support HTTP\/3 with specific builds, but it\u2019s more complex. Always test clients and fall back to HTTP\/2 seamlessly.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>To optimize DirectAdmin on a Linux server, update your stack with CustomBuild, switch to a modern web server and PHP-FPM, [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":19173,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[350],"tags":[],"class_list":["post-13737","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-knowledgebase"],"acf":[],"featured_image_src":"https:\/\/www.youstable.com\/blog\/wp-content\/uploads\/2025\/12\/How-to-Optimize-DirectAdmin-on-Linux-Server.jpg","author_info":{"display_name":"Prahlad Prajapati","author_link":"https:\/\/www.youstable.com\/blog\/author\/prahladblog"},"_links":{"self":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13737","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/comments?post=13737"}],"version-history":[{"count":7,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13737\/revisions"}],"predecessor-version":[{"id":19415,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/posts\/13737\/revisions\/19415"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media\/19173"}],"wp:attachment":[{"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/media?parent=13737"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/categories?post=13737"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.youstable.com\/blog\/wp-json\/wp\/v2\/tags?post=13737"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}