How to install WordPress with Nginx on FreeBSD

How to install WordPress with Nginx and Let’s Encrypt SSL on FreeBSD

In this FreeBSD tutorial, we will learn how to install WordPress using an Apache web server with SSL from Let’s Encrypt for HTTPS.

Free credit $100 for new account at Vultr. Register now

Install Nginx

Install Nginx web server.

Enable the nginx service.

Run the nginx service.

Browse http://serverIP to check if the Nginx web server is running properly.

Configure Server Block

Next, configure the Nginx server block for the domain.

Create a folder for the document root.

Create a folder to store block server configuration files.

Create a server block configuration file.

Fill in the server block configuration file.

Open the Nginx configuration file.

Add the configuration below before closing http.

Check for configuration errors.

If there is no mistake.

Restart the nginx service.


Install PHP

Install PHP 7.4 and its extensions.

Open the PHP-FPM configuration file.

Activate and adjust the following configurations.

Create a php.ini file

Open the php.ini file.

Options activated and changed.

Enable and run the php-fpm service.

Configure the server block to read PHP scripts.

Change the configuration to be like below.

Nginx configuration test.

Restart the nginx service

Create the info.php file.


Install SSL Let’s Encrypt

Install Let’s Encrypt certbot for Nginx.

Request SSL for the domain.

If successful, certbot changes the server block configuration file.



Install MariaDB

Install MariaDB database.

Enable and run the MariaDB service.

Secure MariaDB installation.

Answer the question.

Login to MariaDB.

Create a database for WordPress.

Install WordPress

Download the latest WordPress.

Extract wordpress.tar.gz

Copy the contents of the wordpress folder to the document root.

Change ownership.

Delete the index.html and info.php files created earlier.

Browse to install WordPress.

  • Continue
  • Let’s go!
  • Enter the database name, username, and password that was created in MariaDB. For Database Host = Submit
  • Run the installation
  • Enter the site title, username, password and email. Install WordPress.

WordPress has finished installing.

Browse and login to the dashboard.

Leave a Reply

Your email address will not be published. Required fields are marked *