Full Download
Full Download
Full Download
Hosting
VPS
Domain
Log In
WordPress
VPS
Website Development
eCommerce
Website Errors
How to Make a Website
search
BF-Content-300x427_VPS-Hosting-3.png
VPS
Dec 01, 2023
Edward S.
5min Read
WordPress Nginx: Everything You Need to Know About Installing WordPress on Ubuntu
Nginx is an open-source web server that was first released in 2004 and is written
completely in the C programming language. It has many benefits that you’ll discover
right here! In this tutorial, we’ll show you how to install WordPress with Nginx!
Nginx solves a lot of scalability issues and is taken as a solution to the commonly
referred C10K problem related to concurrency.
And as you now know, Nginx and WordPress work really well together!
Here, we will walk you through the installation of WordPress using Nginx on the
Linux platform.
Similar to LAMP, using Nginx is referred to as LEMP which stands for Linux, Nginx,
MySQL/MariaDB, and PHP.
mysql -u root -p
This will switch over to the MySQL console, which you can tell by the mysql> at the
start of the line. Here you can create a database and a database user with the
names WordPress and WordPressUser respectively.
5. Install PHP
You can install all the required PHP extensions directly with a single command
since these are the only ones that WordPress will use. This can be done using:
cd /tmp
wget https://wordpress.org/latest.tar.gz
Next, you can extract this archive to the directory created earlier. This can be
done using:
tar xf latest.tar.gz
sudo mv /tmp/wordpress/* /var/www/html/kibenevents.com/
The web server will require complete access to these files. Change the permission
using:
ssl_certificate /etc/letsencrypt/live/kibenevents.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/kibenevents.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/kibenevents.com/chain.pem;
include snippets/ssl.conf;
server {
listen 443 ssl http2;
server_name kibenevents.com;
root /var/www/html/kibenevents.com;
index index.php;
# SSL parameters
ssl_certificate /etc/letsencrypt/live/kibenevents.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/kibenevents.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/kibenevents.com/chain.pem;
include snippets/ssl.conf;
include snippets/letsencrypt.conf;
# log files
access_log /var/log/nginx/kibenevents.com.access.log;
error_log /var/log/nginx/kibenevents.com.error.log;
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
expires max;
log_not_found off;
}
}