Cloud House Technologies Logo
CloudHouse Technologies
HomeServicesProjectsBlogAbout UsCareersContact UsLogin
    Cloud House Technologies Logo
    CloudHouse Technologies
    HomeServicesProjectsBlogAbout UsCareersContact UsLogin

    How to Install LiteSpeed on DirectAdmin and Replace Apache for 5x Faster Performance

    Priya

    Content Writer & Researcher

    Last Updated: 29 July 2026
    How to Install LiteSpeed on DirectAdmin and Replace Apache for 5x Faster Performance
    🖥️

    Get LiteSpeed Installed on Your DirectAdmin Server Without Downtime

    CloudHouse Technologies handles Apache-to-LiteSpeed migrations on DirectAdmin servers — including CustomBuild configuration, PHP rebuild, LSCache setup, and load testing to confirm the improvement. Get in touch today.

    🔧 Book Free DiagnosisCall NowWhatsApp
    🖥️12,400+PCs Fixed
    ⭐4.9★Google Rating
    ⚡<15 minAvg. Response
    🛡️ISO 27001Certified

    Apache is the default web server for most DirectAdmin installations — but if your server is struggling under traffic load, Apache's process-based concurrency model may be the bottleneck. LiteSpeed Web Server handles the same traffic with significantly lower CPU and memory usage, and its built-in LiteSpeed Cache (LSCache) plugin delivers instant performance gains for WordPress sites without additional configuration overhead. This guide walks you through the complete process to install LiteSpeed DirectAdmin and replace Apache for dramatically better server performance.

    Apache vs LiteSpeed on DirectAdmin: Performance Benchmarks That Matter

    The performance difference between Apache and LiteSpeed is most visible under concurrent load — the real-world condition that actually causes server slowdowns and 503 errors on shared hosting servers.

    Key differences:

    • Concurrency model: Apache uses a pre-fork or worker MPM model that spawns separate processes or threads per request. Under high load, this exhausts memory quickly. LiteSpeed uses an asynchronous event-driven model similar to nginx — it handles thousands of concurrent connections with a fraction of the memory footprint.
    • Static file serving: LiteSpeed serves static files (images, CSS, JS) at 6–8x faster throughput than Apache under load because it bypasses unnecessary CGI overhead for these requests.
    • PHP execution: With LSPHP (LiteSpeed's PHP SAPI), PHP-FPM overhead is eliminated — LSPHP communicates directly with LiteSpeed via an internal protocol, reducing per-request latency by 20–40% versus Apache+PHP-FPM.
    • WordPress with LSCache: Sites using the LiteSpeed Cache WordPress plugin can serve cached pages at near-static speed, reducing database queries per page load from 50–100 down to 1–2 for cached visitors.

    In practical terms, a DirectAdmin server that maxes out at 200–300 concurrent visitors on Apache can comfortably handle 800–1200 concurrent visitors on LiteSpeed with the same hardware.

    Choosing Between LiteSpeed Enterprise and OpenLiteSpeed for DirectAdmin

    There are two editions of LiteSpeed Web Server, and the choice matters:

    LiteSpeed Web Server Enterprise (LSWS)

    • Paid license — starts at $10/month for a 1-CPU VPS license via https://store.litespeedtech.com
    • Full drop-in replacement for Apache — reads Apache config files (httpd.conf, .htaccess) natively without modification
    • DirectAdmin CustomBuild supports it with a single flag change
    • Required for production hosting servers where .htaccess compatibility is important (WordPress, Joomla, WooCommerce)
    • Includes LSCache server-side component for all sites on the server

    OpenLiteSpeed (OLS)

    • Free, open-source edition
    • Does not read Apache/httpd.conf format — requires native OLS configuration via its own web UI at port 7080
    • Supports LSCache
    • Better suited for fresh deployments where you control the full stack, not for existing DirectAdmin servers with many .htaccess-dependent sites

    Recommendation: For an existing DirectAdmin server hosting shared cPanel-style accounts with WordPress sites, use LiteSpeed Enterprise. The .htaccess compatibility alone is worth the license cost. For a fresh single-site VPS, OpenLiteSpeed is a cost-effective choice.

    💡 None of these worked? Skip the guesswork.

    Get Expert Help →

    Step-by-Step: Installing LiteSpeed via DirectAdmin CustomBuild

    DirectAdmin CustomBuild is the package manager built into DirectAdmin for managing web server, PHP, and related software. It handles the LiteSpeed installation, configuration, and service switch from Apache automatically.

    Prerequisites:

    • DirectAdmin installed and running
    • Root SSH access to the server
    • LiteSpeed Enterprise license key (purchase from litespeedtech.com) — or use the 15-day free trial key trial
    • At least 1 GB free RAM — LiteSpeed itself uses very little, but the switch process temporarily runs both servers
    1Navigate to the CustomBuild directory
    cd /usr/local/directadmin/custombuild
    2Check the current webserver setting
    cat options.conf | grep webserver

    You'll see webserver=apache or webserver=nginx_apache. Take note of the current value.

    3Set the webserver to LiteSpeed
    ./build set webserver litespeed
    4Set your LiteSpeed serial number
    ./build set lsws_serial YOUR_LICENSE_KEY

    Replace YOUR_LICENSE_KEY with your actual license key, or use trial for the 15-day evaluation.

    5Run the LiteSpeed installation
    ./build lsws

    This downloads and installs LiteSpeed Web Server, configures it to read the existing Apache virtual host configurations, and sets up the DirectAdmin integration. The process takes 5–15 minutes depending on your server speed.

    6Confirm LiteSpeed is running
    service lsws status
    # or
    /usr/local/lsws/bin/lswsctrl status
    1Set PHP to use LSPHP mode in CustomBuild
    cd /usr/local/directadmin/custombuild
    ./build set php1_mode lsphp

    If you have multiple PHP versions, set each one:

    ./build set php2_mode lsphp
    ./build set php3_mode lsphp
    2Rebuild PHP
    ./build php

    This compiles PHP with LSPHP support. The process takes 20–45 minutes on a typical VPS. Do not interrupt it.

    3Restart LiteSpeed to pick up the new PHP SAPI
    service lsws restart
    4Verify PHP is running via LSPHP

    Create a test phpinfo page on any domain and check the Server API line — it should read LiteSpeed, not FPM or CGI.

    1Install the LiteSpeed Cache WordPress plugin

    For each WordPress site on the server, install the free LiteSpeed Cache plugin from the WordPress plugin directory. It is actively maintained by LiteSpeed Technologies and has 6+ million active installations.

    2Enable server-level cache storage

    LiteSpeed stores cached pages on disk at /tmp/lscache/ by default. For high-traffic servers, move this to a RAM-backed tmpfs mount:

    # Add to /etc/fstab
    tmpfs /tmp/lscache tmpfs defaults,size=2G 0 0
    
    # Mount immediately
    mount /tmp/lscache
    3Configure LSCache settings in WordPress

    In the WordPress admin, go to LiteSpeed Cache → Cache. Enable:

    • Enable Cache: On
    • Cache Logged-in Users: Off (unless required)
    • Cache commenters: Off
    • Cache REST API: On (for headless setups)

    Under LiteSpeed Cache → Page Optimization, enable CSS and JS minification and combination. These settings are safe for most themes but test on a staging site first for complex setups.

    Tuning maxConnections and Worker Processes for High-Traffic VPS

    LiteSpeed's default configuration is conservative. For a VPS with 4+ CPU cores and 8+ GB RAM handling hosting traffic, tune these settings via the LiteSpeed Web Admin Console at https://server-ip:7080:

    Navigate to Configuration → Server → Tuning:

    • Max Connections: Set to 2000–5000 for a 4-core server (default is 1000)
    • Max SSL Connections: Set to 1000–2000
    • Connection Timeout: 30 seconds (default 300 is too high for shared hosting)
    • Keep-Alive Timeout: 5 seconds for shared hosting (reduce from default 15)

    Navigate to Configuration → Server → General:

    • Worker Processes: Set equal to the number of CPU cores (e.g. 4 for a 4-core server)

    After making changes in the admin console, perform a graceful restart:

    /usr/local/lsws/bin/lswsctrl restart

    Validating the Switch: Before/After Load Testing

    Quantify the improvement with a simple load test before and after the switch. Use ab (Apache Bench, already installed on most servers):

    # Run before switching to LiteSpeed (on Apache)
    ab -n 1000 -c 100 https://yourdomain.com/
    
    # Run after switching to LiteSpeed + LSPHP + LSCache enabled
    ab -n 1000 -c 100 https://yourdomain.com/

    Compare the Requests per second and Time per request metrics. A typical improvement on a WordPress site with LSCache enabled:

    • Requests/second: 50–80 on Apache → 400–800 on LiteSpeed+LSCache
    • Time per request (mean): 1200ms on Apache → 120–200ms on LiteSpeed+LSCache

    For a grep-friendly log of what changed during the switch:

    grep -i "litespeed\|lsphp\|lscache" /var/log/directadmin/system.log | tail -50

    If you're managing a hosting business and want a professional migration from Apache to LiteSpeed without downtime, CloudHouse Technologies' managed server service can handle the full transition including CustomBuild configuration, PHP rebuild, LSCache setup, and load testing.

    FAQs

    Will switching to LiteSpeed break my existing .htaccess rules?
    LiteSpeed Enterprise reads .htaccess files natively in Apache compatibility mode — the same rules work without any modification. This is the primary reason to choose LiteSpeed Enterprise over OpenLiteSpeed for existing DirectAdmin servers.

    Can I switch back to Apache if LiteSpeed causes problems?
    Yes. Run cd /usr/local/directadmin/custombuild && ./build set webserver apache && ./build apache to revert. LiteSpeed does not delete the Apache installation — it simply deactivates it. The switch back takes about 2–5 minutes.

    Does LiteSpeed work with CloudLinux on DirectAdmin?
    Yes. LiteSpeed is fully compatible with CloudLinux CageFS and LVE (resource limits). In fact, LiteSpeed's LSPHP mode works better than Apache+suPHP under CloudLinux because it uses less memory per request within the LVE container limits.

    How do I update LiteSpeed when a new version is released?
    Run ./build lsws from the CustomBuild directory — it checks for the latest version and updates in place. Schedule this during a low-traffic window as it requires a brief service restart.

    Why is LiteSpeed showing HTTP instead of HTTPS for some sites after migration?
    This usually means the SSL certificate vhost configuration was not picked up correctly. Check /usr/local/lsws/conf/vhosts/ for your domain's config and verify the SSL listener is bound to port 443. Run ./build rewrite_confs from CustomBuild to regenerate all vhost configs from DirectAdmin's database.

    Get the Free Linux Server Admin Cheatsheet (PDF)

    Essential commands for server management, networking, and troubleshooting — all on one printable page.

    Running Linux servers? Let us manage them for you.

    Our Managed Linux Server plans cover updates, security hardening, monitoring, and 24/7 incident response — so your servers stay up and your team stays focused.

    • Proactive OS patching and security updates
    • 24×7 monitoring with instant alerting
    • Backup configuration and disaster recovery
    • Dedicated Linux engineers on call
    See Pricing Plans →

    What our customers say

    “Our production server went down at 2 AM. CloudHouse had it back online in under 20 minutes. Incredible response time.”

    Arun S.

    CTO, SaaS Startup

    “They migrated our entire infrastructure from Ubuntu 18 to 22 with zero downtime. Couldn't have asked for better.”

    Deepak N.

    DevOps Lead

    Frequently Asked Questions

    LiteSpeed Enterprise reads .htaccess files natively in Apache compatibility mode — the same rules work without modification. This is the primary reason to choose LiteSpeed Enterprise over OpenLiteSpeed for existing DirectAdmin servers.

    Book your free 15-minute diagnosis

    A certified technician will call you back within 15 minutes during business hours.

    Share this article

    Leave a Comment

    Comments (0)

    Loading comments...

    Is Apache Slowing Down Your DirectAdmin Server?

    Switching from Apache to LiteSpeed on DirectAdmin is a proven way to handle 3–5x more concurrent visitors with the same hardware. CloudHouse Technologies manages this migration as part of our server performance optimisation service.

    Call Now — FreeWhatsApp Us

    Why CloudHouse?

    • ISO 27001:2022 certified
    • 12,400+ devices supported
    • 4.9★ on Google
    • Sub-15-minute response

    CloudHouse Technologies

    Innovative cloud solutions for modern businesses. We deliver cutting-edge technology with exceptional service.

    Contact Us

    CloudHouse Technologies Pvt.Ltd
    Special Economic Zone(SEZ),
    Infopark Thirissur,4B-15,
    Indeevaram,Nalukettu Road,
    Koratty, Kerala, India-680308
    0480-27327360
    info@cloudhousetechnologies.com

    Quick Links

    • Our Services
    • Gold Loan Software
    • About Us
    • Contact
    • Terms and Conditions
    • Privacy Policy
    ISO27001:2022
    Certified

    © 2026 CloudHouse Technologies Pvt.Ltd. All rights reserved.

    Back to top