How to install WordPress with lighttpd on Debian 10?

Windows Articles

How to check domain controller status in Windows Server 2019/2016.

Hello! The administration of Windows Server is very important. Indeed, the administrator manages many processes and roles that affect the optimal functioning...

How to install Vanilla Forum on Ubuntu 20.04?

Hello, folks. This post is about how to install Vanilla Forum on Ubuntu 20.04. Vanilla is an opensource discussion...

How to backup and restore Group Policy Objects in Windows Server 2016/2019.

Hi! Previously we have mentioned that Windows Server pursues a centralized administration of each role and service. In this way, a fluid...

How to use the ls command?

The ls commands list the content and optional information of the directories and files. When you execute the Ls command without options,...

How to Install APK file on Android

Hello Friends! Today we bring you a simple guide on how to install an APK file in Android. What...
angeloma
angeloma
Senior Writer and partner

This time I will show you how to install WordPress with Lighttpd on Debian 10

What is WordPress?

WordPress is a CMS (content manager system) that is to say it is an application that allows you to create a blog of information. However, over time has evolved and not only provides services to create blogs but corporate websites or what you can imagine.

Thanks to WordPress and CMS, publish news and entries, do not require knowledge of HTML or PHP, but everything is visual.

So, if you want to have a personal blog or for educational purposes, WordPress is a pretty good solution.

So, let us start.

Install WordPress with Lighttpd on Debian 10

Install Lighttpd on Debian 10

Obviously the first step is to install and run Lighttpd on Debian 10. But don’t worry, we have prepared a post for you so you can do it without any problems.

How to install Lighttpd on Debian 10?

Of course, additionally, you have to install some extra PHP modules to make WordPress work properly.

php7.3 php7.3-fpm php7.3-mysql php7.3-cli php7.3-curl php7.3-xml php-json php-zip php-mbstring php-gd php-intl php-cgi

Once you have installed them, it is now the turn of the database manager.

Create a new database and user for WordPress

Now it’s time to install a database manager. In this case, we will opt for MariaDB. First we install it with the following command:

:~$ sudo apt install mariadb-server

Then, once the installation is complete, the mysq_secure_installation script must be run to define a new key for the root user and other configurations.

:~$ sudo mysql_secure_installation

After defining the new password for the root user, you will have to answer a few questions.

Remove anonymous users? Y
Disallow root login remotely? Y
Remove test database and access to it? Y
Reload privilege tables now? Y

Now access the MariaDB console to create the database for WordPress and a new user.

:~$ sudo mysql -u root -p
> CREATE DATABASE wordpress; > GRANT ALL PRIVILEGES on wordpress.* TO 'wordpress_user'@'localhost' IDENTIFIED BY 'wordpress_pss123'; > FLUSH PRIVILEGES; > EXIT;

That’s enough. Now let’s download WordPress.

Download WordPress on Debian 10

Now we can download and install WordPress. So let’s go for it.

Go to the /tmp folder and from there do the download using wget.

:~$ cd /tmp
:~$ wget -c https://wordpress.org/latest.tar.gz
1.- Download WordPress on Debian 10
1.- Download WordPress on Debian 10

Then, unzip it.

:~$ tar -xvzf latest.tar.gz

Then move it to /var/www/html/ and change the permissions of the folder as well as the owner of it.

:~$ sudo mv wordpress/ /var/www/html/
:~$ sudo chown -R www-data:www-data /var/www/html/wordpress/
:~$ sudo chmod 755 -R /var/www/html/wordpress/

Now we will create a new virtual host in Lighttpd.

First, let’s rename the WordPress folder with the name of the virtual host you want. In this case I will choose wordpress.osradar.lan. Obviously you are free to choose yours.

:~$ sudo mv /var/www/html/wordpress/ /var/www/html/wordpress.osradar.lan

Then, create the folder dedicated to virtual hosts in Lighttpd.

:~$ sudo mkdir -p /etc/lighttpd/vhosts.d/

And add it to the main Lighttpd configuration file:

:~$ sudo nano /etc/lighttpd/lighttpd.conf
include_shell "cat /etc/lighttpd/vhosts.d/*.conf"

Save the changes and close the file.

Now create the configuration file for the new Virtual host.

:~$ sudo nano /etc/lighttpd/vhosts.d/wordpress.osradar.lan.conf

Note how the file name equals the WordPress folder. This is for recommendation. Now add the following:

$HTTP["host"] =~ "(^|.)wordpress.osradar.lan$" {
server.document-root = "/var/www/html/wordpress.osradar.lan"
server.errorlog = "/var/log/lighttpd/wordpress.osradar.lan-error.log"
accesslog.filename = "/var/log/lighttpd/wordpress.osradar.lan-access.log"
url.rewrite-final = ("^/(.*.php)" => "$0", "^/(.*)$" => "/index.php/$1" )
}
2.- Creating a new virtual host for WordPress
2.- Creating a new virtual host for WordPress

Save the changes and close the file.

Now, check the syntax.

:~$ sudo lighttpd -t -f /etc/lighttpd/lighttpd.conf
Syntax OK

And restart Lighttpd.

:~$ sudo systemctl restart lighttpd

Now, complete the installation using the web interface.

Install WordPress with Lighttpd on Debian

Now, open your web browser and go complete the installation. Remember that the address depends on your virtual host and your server. You will see the following:

3.- WordPress installation
3.- WordPress installation

Now, type your database credentials.

4.- Type the Database Credentials
4.- Type the Database Credentials

Now, start the installation.

5.- Install WordPress with Lighttpd on Debian 10
5.- Install WordPress with Lighttpd on Debian 10

After that, configure the site information and the admin password.

6.- Site information
6.- Site information

If everything went well, you’ll see this screen:

7.- WordPress successfully installed
7.- WordPress successfully installed

Then you can log in with your username and password and you will see the dashboard.

8.- WordPress with lighttpd on Debian 10
8.- WordPress with lighttpd on Debian 10

So, that is it.

Conclusion

While it is true that WordPress is very popular, most installations are done with Apache or Nginx. Well, today we’ve shown you how to use it with another fast and lightweight web server like Lighttpd.

Please share this post and join our Telegram channel.

 

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to check domain controller status in Windows Server 2019/2016.

Hello! The administration of Windows Server is very important. Indeed, the administrator manages many processes and roles that affect the optimal functioning...

How to install Vanilla Forum on Ubuntu 20.04?

Hello, folks. This post is about how to install Vanilla Forum on Ubuntu 20.04. Vanilla is an opensource discussion...

How to backup and restore Group Policy Objects in Windows Server 2016/2019.

Hi! Previously we have mentioned that Windows Server pursues a centralized administration of each role and service. In this way, a fluid...

How to use the ls command?

The ls commands list the content and optional information of the directories and files. When you execute the Ls command without options,...

How to Install APK file on Android

Hello Friends! Today we bring you a simple guide on how to install an APK file in Android. What...
x