Much of our success here at Brixly is credited to our high-speed infrastructure that allows for our customers to have extremely fast loading websites. With the rise of mobile devices accessing the Internet and Google’s constantly changing algorithm, there has never been a more important time than ever to have your website optimized for speed. One key element in our infrastructure is using all LiteSpeed web servers.
What Is LiteSpeed Web Server?
In recent years, Litespeed Web Server has become more popular amongst web developers in the web hosting industry. LiteSpeed Web Server (abbreviated LSWS) is often compared directly to Apache, as it was designed as a drop-in-replacement. Even though LiteSpeed Web Server is not based on Apache code. In fact, it is more in common with Nginx, when you look in depth. LiteSpeed Web Server is a relatively lightweight piece of server software that conserves resources without sacrificing performance, security, compatibility, or convenience.
Like Nginx, LiteSpeed Web Server was built from the ground up to use an event-driven architecture, which is more efficient and better-performing than Apache’s process-based model. But unlike Nginx, LiteSpeed Web Server was designed to understand Apache’s configuration files, mod_security rules, and mod_rewrite rules. And it supports .htaccess natively, in a much more efficient way. Because of this compatibility, LiteSpeed Web Server may be used with any control panel that was written for Apache, including cPanel, Plesk, and DirectAdmin.
With LiteSpeed, you get the best of both worlds: event-driven scalability similar to Nginx, and the ability to use familiar and universal Apache tools for all of your management tasks.
Main LiteSpeed Benefits
- Double the maximum capacity of Apache – The majority of “shared” web hosts still use Apache web server. LiteSpeed Web Server’s streamlined event-driven architecture, capable of handling thousands of concurrent clients with minimal memory consumption and CPU usage.
- Added security – More secure using already familiar mod_security rules while also taking advantage of a host of built-in anti-DDoS features, such as bandwidth and connection throttling.
- Reduce complexity – By eliminating the need for an HTTPS reverse proxy or additional 3rd party caching layers.
LiteSpeed WordPress Cache
In recent months, LiteSpeed implemented their caching software specifically for WordPress website. The term ‘Caching‘ means LiteSpeed web server keeps a copy of pages it has already served and if someone was to visit that page again it’ll send the cached copy. This saves the time it takes for the server to create that page. This results in much faster user experiences for your visitors. All Shared and Reseller clients have the ability to use LiteSpeed’s WordPress caching plugin free of charge.
While LiteSpeed is just one piece of our infrastructure, it’s a very important one, and helps us deliver crazy-fast speeds so our customers can focus on what’s most important to them; running their businesses.
What is Apache Web Server?
Apache is the most commonly used Web server on Linux systems. Web servers are used to serve Web pages requested by client computers. Clients typically request and view Web pages using Web browser applications such as Firefox, Google Chrome, Opera, Safari, or Internet Explorer. Apache is also open source, and as such, it is developed and maintained by a large group of global volunteers. One of the key reasons Apache is so popular is that the software is free for anyone to download and use.
The most common protocol used to transfer Web pages is the Hyper Text Transfer Protocol (HTTP). Protocols such as Hyper Text Transfer Protocol over Secure Sockets Layer (HTTPS), and File Transfer Protocol (FTP), a protocol for uploading and downloading files, are also supported. Apache Web Servers are often used in combination with the MySQL database engine, the HyperText Preprocessor (PHP) scripting language, and other popular scripting languages such as Python and Perl. This configuration is termed LAMP (Linux, Apache, MySQL and Perl/Python/PHP) and forms a powerful and robust platform for the development and deployment of Web-based applications.
Guess what, apache is completely free! Plus, Apache’s open-source focus attracts a vibrant community of talented developers around the world. The result is a product that’s always improving and can be highly customised with blocks of code called modules.
Some of the most commonly implemented modules include:
- SSL/TLS
- Server-Side Programming Support (for PHP)
- Load Balancing (for large amounts of traffic)
Apache server has other features too:
- Loadable Dynamic Modules
- Handling of static files, index files, auto-indexing, and content negotiation
- .htaccess per-directory configuration support
- Apache is compatible with IPv6
- Apache Server supports HTTP/2
- gzip compression and decompression
- FTP connections are possible with proper module
- Perl, PHP and Lua scripts are already build
Benefits of using Apache Web Servers
- Apache is an open-source web hosting solution. Therefore, anyone can use it for free.
- The customizable code of Apache makes it easier for administrators to adjust their needs accordingly.
- Apache lets you add numerous features and modules to enhance functionality and boost performance.
- Highly reliable and straightforward
- Apache can run on almost every operating system
- Apache has praiseworthy documentation that is very extensive and helpful.
What is Nginx?
NGINX is a web server but commonly used as a reverse proxy. It can be scaled efficiently as a web server as well as a reverse proxy. It does not allow you to allocate a process to a particular connection, but it creates a process pool that can be easily shared among multiple connections within the network. Whenever a request is made, a resource will be allocated to the process resulting in better resource utilization that can easily handle extensive connections.
NGINX also helps in setting up a secured connection between your data-centers and the outside network. It also works well as an HTTP load balancer that allows you to use multiple different load-sharing mechanisms.
This definition might sound quite complex, but in most cases, you won’t need to know the inner workings of the server software. Thanks to its event-driven approach, NGINX can successfully process millions of simultaneous requests. It also scales very well and provides optimized web performance.
Some common features seen in Nginx include:
- Reverse proxy with caching
- IPv6
- Load balancing
- FastCGI support with caching
- WebSockets
- Handling of static files, index files, and auto-indexing
- TLS/SSL with SNI
Benefits of using Nginx
- Uses Non-blocking, Event-driven architecture that requires less CPU and memory.
- It has a lot of options to optimize and serve static content. So serving the static content 2.5 times faster than Apache and consumes less memory.
- Works great with a multi-processor environment.
- Built-in configuration option to prevent DDoS attacks.
Although NGINX is free to use, it also has a paid version called NGINX Plus, an all-in-one load balancer, content cache, web server, API gateway, and microservices proxy that costs $2,500 per year.
LiteSpeed vs Apache Web Server vs Nginx
You’ve probably heard compelling arguments for the most popular options when choosing web servers. There are three main option to choose from: LiteSpeed, NGINX, and Apache. All three web servers are stable, well-maintained, and feature-rich. You can’t really go wrong with either of them, considering you chose the right one for your requirements. However, if you get down to the technical details, you’ll start noticing some subtle features, which may make you choose one over the other. LiteSpeed Web Server is the newest of these three competitors, and fast becoming one of the more popular choices. As with NGINX, they took a good look at long-time leader Apache and prioritised speed and customisability.
The main difference between Apache and NGINX lies in their design architecture. Apache uses a process-driven approach and creates a new thread for each request. At the same time, NGINX uses an event-driven architecture to handle multiple requests within one thread.
The HTTP or Apache server is an open-source, cross-platform web server known as “httpd.”. In recent years, NGINX has become more popular than Apache Web Server, due to various factors. Apache Servers static content using the file base method while Nginx servers static resources without using PHP. Apache Supports all Unix systems, including Linux & BSD also fully supports MS-Windows, while Nginx almost supports Unix OS and Windows partially. Moreover, Nginx has a lightweight structure and much faster architecture than Apache.
Security
In web hosting security is a serious concern, which is why Litespeed supports ModSecurity rules (like Apache and Nginx), but it does so without compromising on performance, thanks to LiteSpeed Web Server’s efficient implementation. LiteSpeed Web Server also ships with reCAPTCHA support, WordPress brute force attack protection, and other cutting-edge anti-DDoS measures. LiteSpeed Web Server conserves resources without sacrificing performance, security, compatibility, or convenience. NGINX is also fairly secure by design, and has extensive documentation on how to secure NGINX deployments.
Performance
As important as ease-of-management is, it means nothing if your web server of choice doesn’t perform well. LiteSpeed’s benchmarks, when compared to Nginx and Apache, speak for themselves. When you switch to LiteSpeed Web Server, you can be confident that your sites will experience measurable improvements in speed. LiteSpeed’s simpler stack and intelligent cache give it an edge. With LiteSpeed’s advanced built-in cache engine, you can eliminate the need for the HTTPS reverse proxies or additional third party caching layers required with Apache. Plus, LiteSpeed stores compressed cache files, where Nginx does not.
You should use Nginx
- If you are using a VPS or dedicated hosting.
- If you are running a high-traffic website with a lot of static content.
- If you want to manage incoming traffic and distribute it to slower upstream servers.
You should use Apache
- If you are using shared hosting.
- If you value the supportive community and the wealth of resources it provides.
- Web developers often do well with Apache – it’s easier to configure.
Each of these web servers is unique and offers at least one powerful feature compared to the other one. Apache has been around for many years, and most hosting providers use Apache as the main software of their servers since it is highly stable and reliable. On the other hand, LiteSpeed tends to handle way more traffic compared to Apache and save resources without losing the performance of the server. As mentioned above, in recent years, many hosting providers have been switching to LiteSpeed for some websites due to the high number of DDOS attacks as it can handle DDOS way better than any web server.
On the other hand, Nginx web servers have taken the world by storm. Compared to LiteSpeed, it has been powering over 7 million web servers in almost any category. The core of Nginx is open-source and totally free. However, the enterprise version of the software is paid. Although, when it comes to speed and performance, LiteSpeed is much faster than Nginx since it is built specifically for performance and improves it.
How to install LiteSpeed cache plugin in WordPress
To install LiteSpeed Cache plugin on your WordPress site, follow these steps:
1) Log into your WordPress admin panel (wp-admin).
2) Locate and hover on ‘Plugins‘ In the left sidebar, and then click on ‘Add New’.
3) In the Search plugins text box, type ‘LiteSpeed Cache’ and press ‘Enter’. Then, click ‘Install Now‘ under the LiteSpeed Cache plugin box.
4) Once the installation has completed, click ‘Plugins‘ and click ‘Activate‘.
How to Enable LiteSpeed cache for all sites via WHM
You may use the following steps to enable LiteSpeed cache for all or some of the WordPress sites on your server if you have root WHM access.
Part of the process of enabling the cache for WordPress sites requires the installation of the following plugin to the end user’s WordPress: WordPress.org Plugins – LiteSpeed Cache
When you perform the steps outlined in the Procedure section below, the above plugin will automatically be installed on your client sites. The plugin will appear within the plugins list inside of their WordPress admin interface just like any other WordPress plugin.
Any user that has access to the Admin interface of a WordPress site has the ability to manually add and remove this plugin just like any other plugin. This means that they have the ability to remove this plugin after you install it, and they also have the ability to enable it and make use of the LiteSpeed cache without your intervention as well.
Getting Started
- Login to WHM as the root user.
- Navigate to: ‘Home »Plugins » LiteSpeed Web Server Plugin.‘
- Click on the ‘Manage Cache Installations‘ link.
- Click the blue ‘Scan‘ button to find all the sites on your server.
- Select the sites that you would like to enable the cache for.
- Click the ‘Enable‘ button.
How to Enable LiteSpeed cache for WordPress using cPanel
There are a number of ways you can install the LiteSpeed cache plugin for WordPress, we’re going to explain how to do so from cPanel. This is useful if you’ve more than one WordPress instance so you can install LiteSpeed in bulk on one step. You can also install it from the WP admin panel.
- Login to ‘cPanel‘
- Search for ‘LiteSpeed Web Cache Manager‘
- Scroll down and click on ‘WordPress Cache‘
- Click Scan to find all WordPress instances on your hosting account
- Click ‘Enable‘ besides the WP instance you would like to enable LiteSpeed on or you can select multiple instances and enable the plugin in bulk. (Make sure no other cache plugin is installed before you enable LSCache)
- You can now find the plugin installed in your WordPress admin panel.
Why we use LiteSpeed?
Hands down, LiteSpeed serves static content a lot faster than any other web server, including Nginx and Apache. It increases PHP performance due to its custom PHP LSAPI. Since it is 100% Apache compatible, you can use the mod_security module you normally use to block most of the web attacks. LiteSpeed works with all the known rules without any extra setup needed.
On top of that, LiteSpeed has its own security features that come in handy when your website is under a malicious attack such as a DoS or DDoS attack. LiteSpeed Web Server has built-in anti-DDoS options such as bandwidth and connection throttling.
Additionally, the vast majority of our customers run their websites on PHP applications, such as WordPress or Joomla, and one key component of the LiteSpeed Web Server is lsphp, a process that bridges the connection of PHP applications to the Web Server. LSPHP is incredibly efficient at what it does, especially compared to it’s equivalent on Apache.
In short, we utilise LiteSpeed Web Server to provide you with the best hosting experience possible.
We use LiteSpeed caching to deliver content to our users almost instantly. Check out our WordPress Hosting plans!