Lighttpd (pronounced “Lighty”) is high-performance web server software designed for speed, security, and flexibility. It can be an excellent option for environments with minimal resources, dynamic websites, or diverse applications. However, you might be wondering what makes it different from other solutions.
In this article, we’ll explore Lighttpd and see what makes it unique. We’ll also show you how to run your WordPress website on Lighttpd. Let’s get started!
What Is Lighttpd?
Lighttpd is open-source web server software. It’s designed specifically for environments with limited resources since it consumes minimal CPU and RAM. It’s also suitable for both the Windows and Linux Operating Systems (OSs):
Lighttpd was initially released in 2003 by Jan Kneschke, a German software developer. Kneschke originally wrote the software to prove that one server could handle 10,000 simultaneous connections, otherwise known as the c10k problem.
Like other web server software, Lighttpd makes your content visible online. When a user’s browser requests to view your website, the software receives the query, retrieves your site’s content, and displays it in HTML format.
Unless you set up your own server, your hosting provider will usually determine your web server software. Later in this post, we’ll show you how to find out if your host is working with Lighttpd.
Is Lighttpd Different From Other Web Server Software?
Lighttpd is just one of many web server software options. Hosting providers and website owners opt for different software according to their needs when it comes to security, speed, ease of use, and access to developer tools.
For example, Apache might be a better option if you’re looking for extensibility and customization options, due to its various modules. However, Lighttpd uses fewer resources than Apache, making it more efficient.
NGINX is another extremely popular web server that’s praised for its high-performance features. When compared to Lighttpd, NGINX is arguably more stable and has more frequent development updates. These software options also have slightly different operating processes. Lighttpd runs as one process, whereas NGINX has an overarching process and supporting worker processes.
LiteSpeed is another lightweight web server software option. It’s impressive for its high-performance features, minimal resource consumption, and built-in security. It typically receives more updates and costs more than Lighttpd (unless you run the limited open-source version). Moreover, LiteSpeed is significantly more popular than Lighttpd, so you’ll get access to more developer and user resources.
How Does Lighttpd Work?
Lighttpd includes support for FastCGI, CGI, and SCGI. As such, you can use this server software with applications written in any programming language, including:
- PHP
- Python
- Perl
- Ruby
- Lua
Furthermore, Lighttpd handles requests asynchronously. This means that the web server software doesn’t stop the browser from performing actions while it’s working in the background.
Therefore, Lighttpd can handle multiple requests without slowing down your site and inconveniencing your users. This setup enables you to work on various applications simultaneously.
The Pros and Cons of Lighttpd
Here are the most significant advantages of using Lighttpd:
- It uses minimal CPU, RAM, and other resources.
- It supports all programming languages.
- It’s open-source and free to use.
In contrast, here are some of the most significant disadvantages of this server software:
- It’s not as popular as other software options, so you’ll find less community support and documentation.
- It lacks the advanced features and customizable modules of other server software.
- Lighttpd has limited performance advantages for larger websites.
Overall, Lighttpd can be an excellent choice if you want to minimize CPU and RAM consumption. This lightweight software is also great for development since it supports web applications in any programming language. However, it’s best suited to smaller websites and apps.
How to Determine If Your Web Server Is Using Lighttpd
You might be able to see if your web server is using Lighttpd by navigating to your hosting provider’s dashboard. This information may also be available when you sign up for a hosting package.
Alternatively, you can determine your website’s server software through Google Chrome. The browser has built-in Developer Tools to help you learn more about sites when you visit them.
Open your website, and hit Ctrl + Shift + I on your keyboard to open Developer Tools. You should see a pop-up panel:
Now click on the Network tab and refresh your page to load the data. Select any of the entries under Name and scroll down to Response Headers. Under Server, you should be able to see the web server’s name and version:
It’s that easy! However, you might not see the web server software if your site utilizes Cloudflare or a similar proxy service.
If your server isn’t using Lighttpd, you can install and set up the software yourself. You’ll then need to follow the basic setup and configuration instructions to get it running correctly.
However, you’ll need a good dedicated server or Virtual Private Server (VPS) to get root access and install your own web server software. Alternatively, you can look for a good dedicated hosting provider that supports Lighttpd by default, such as A2 Hosting.
How to Run WordPress on Lighttpd (In 3 Steps)
Finally, let’s take a quick look at how you can set up Lighttpd manually. Although this software can technically run on Windows, it’s better suited to Linux distributions such as Ubuntu. Therefore, we’ll focus on that option for your WordPress website.
Step 1: Install Lighttpd
First, you’ll want to update and upgrade your system files to ensure that everything is working as it should. Open the command line and enter the following commands:
sudo apt update
sudo apt upgrade
The next command will install Lighttpd on your system (if you haven’t done so already):
sudo apt install lighttpd
You’ll now need to tell your OS to launch your Lighttpd web server whenever it reboots. You can set that up with this command:
sudo systemctl enable lighttpd
Step 2: Set Up PHP and Databases
Now it’s time to install PHP and all of its extensions. Without PHP, your WordPress website can’t run, so this is one of the essential steps:
sudo apt-get install php php-cgi php-cli php-fpm php-curl php-gd php-mysql php-mbstring zip unzip apache2-
The following commands will enable the FastCGI extensions, and test them to ensure that PHP will work correctly:
sudo lighty-enable-mod fastcgi fastcgi-php
sudo service lighttpd force-reload
If you don’t already have a MySQL database set up for your WordPress site, you can use these commands to create one and secure it against malicious actors:
sudo apt install mysql-server
sudo mysql_secure_installation
You’ll also need to make a database for your WordPress website:
sudo mysql
Now create a name for your database, replacing “example_database” with your chosen title:
create database `example_database` character set = 'utf8';
You’ll now make a user and associated password for your WordPress database, replacing “name” and “password” with your chosen values. You’ll also give them permission to manage your database:
create user 'name'@'localhost' identified by 'password';
GRANT ALL PRIVILEGES ON `example_database`.* to `name`@localhost;
exit
Step 3: Download and Set Up WordPress
The following commands will obtain the latest version of WordPress core for your website:
cd /tmp
wget https://wordpress.org/latest.zip
You’ll then need to make a root folder for your site, replacing “name” with your website’s name:
sudo mkdir /var/www/html/name
The following commands will extract the WordPress files from the .zip folder and move them into your new folder:
sudo unzip /tmp/latest.zip
sudo mv /tmp/wordpress/* /var/www/html/name
You’ll also want to make sure that your admin user can access this folder:
sudo chown -R www-data:www-data /var/www/html/name
Now access your WordPress login through your browser with this address, again using your website’s directory name:
http://server-ip-address/name
That’s it! Lighttpd is now set up and ready to use.
Conclusion
Choosing the correct server software for your needs can boost your website or application’s success. Fortunately, Lighttpd is suitable for several kinds of environments.
As we discussed in this article, Lighttpd is a lightweight software that consumes minimal CPU and RAM. Therefore, it’s an excellent choice for Linux-based environments with few resources to spare. It’s also open-source, free to use, and supports all programming languages.
If you’re looking for a hosting company that supports this web server software, check out Pressable, Cloudways, SiteGround, and Flywheel.
Do you have any questions about using the Lighttpd web server software? Let us know in the comments section below!
lighttpd is a modular web server and is fast, featureful, and secure. https://wiki.lighttpd.net/ This article contains very outdated information, perhaps cut-n-paste from something written many, many years ago! Modern lighttpd does not have the limitations suggested by the article author.
Thank you for your comment, Glenn.
Lighttpd Web Server is a most powerful server & amazing them