Lighttpd is a secure, fast, and flexible HTTP server with a small memory footprint compared to other webservers. Its event-driven architecture is optimized for a large number of parallel connections (keep-alive) which is important for high-performance dynamic applications. WordPress, the most powerful and popular content management system (CMS) is the right tool to develop and build powerful and dynamic websites based on PHP is flexible and can be run on a variety of HTTP servers. When you’re ready to set up WordPress with Lighttpd support, follow the steps below:

Install Lighttpd HTTP Server

After installing Lighttpd, the commands below can be used to stop, start and enable Lighttpd service to always startup when the server boots up.

Install MariaDB Database Server

OrangeHRM also requires a database server. and MariaDB database server is a great place to start. To install it run the commands below. After installing, the commands below can be used to stop, start and enable the MariaDB service to always start up when the server boots. After that, run the commands below to secure the MariaDB server. When prompted, answer the questions below by following the guide.

Enter current password for root (enter for none): Just press the Enter Set root password? [Y/n]: Y New password: Enter password Re-enter new password: Repeat password Remove anonymous users? [Y/n]: Y Disallow root login remotely? [Y/n]: Y Remove test database and access to it? [Y/n]:  Y Reload privilege tables now? [Y/n]:  Y

Restart MariaDB server

PHP 7.1 isn’t available on Ubuntu default repositories… to install it, you will have to get it from third-party repositories. Run the commands below to add the below third party repository to upgrade to PHP 7.1 Then update and upgrade to PHP 7.1 After that, run the commands below to install PHP7.1-FastCGI and related PHP modules. Many PHP modules perform different functions. however, the ones below may be needed when developing PHP-based websites. After installing PHP7.1-FastCGI, you can enable PHP-FastCGI modules by running the commands below If the commands above fail, install the package below. Then run the commands to enable the modules again, this time they should work.

Create WordPress Database

Now that you’ve installed all the packages that are required, continue below to start configuring the servers. First, run the commands below to create a blank WordPress database. To log on to the MariaDB database server, run the commands below. Then create a database called wpdb Create a database user called wpdbuser with a new password Then grant the user full access to the database. Finally, save your changes and exit.

Configure Lighttpd PHP-FastCGI Settings

Next, you may want to configure Lighttpd to use PHP server scripting properly. The default PHP-FastCGI configuration file is located at /etc/php/7.1/cgi/php.ini Open the PHP Lighttpd configuration file by running the commands below Then edit the file to suit your environment. Some important lines to consider: Next, open the Lighttpd site configuration file. by default, it’s stored at /etc/lighttpd/lighttpd.conf They configure the highlighted lines below to enable its rewrite module and create a VirtualHost for our site and save the file. Remember to replace example.com with your domain name. Next, run the commands below to open the FastCGI default configuration file for Lighttpd. Then confirm that PHP-FastCGI is configured as shown in the highlighted portion below to use PHP 7.1.

Download WordPress Latest Release

Next, visit the WordPress site and download the latest version. After downloading, run the commands below to extract the downloaded file and move it into a new WordPress root directory. Then run the commands below to set the correct permissions for WordPress to function.

Configure WordPress

Now that Lighttpd is configured, run the commands below to create a WordPress wp-config.php file. Then run the commands below to open the WordPress configuration file. Enter the highlighted text below that you created for your database and save. Restart Lighttpd services After that, open your browser and browse your domain name to launch the WordPress configuration wizard. You should see the WordPress setup wizard complete. Please follow the wizard carefully. Then type the WordPress website name and create a new admin user and password. then click install. This should install WordPress. Congratulations! You’ve successfully installed WordPress on Ubuntu. You may also like the post below: