Initial Setup


Updated: 2020-08-17

Update/Upgrade Packages



Install the Nginx Web Server

Nginx Web Server

Install Nginx Web Server.

Allow HTTP connections.

Install MySQL

Installing and Configuring MySQL Database

Installing MySQL Database.

Run MySQL script to secure the installation.

Set a password for root MySQL user.

Check authentication method of each MySQL user accounts.

Configure the root account to authenticate with a password.

Flush the privileges.

Exit MySQL.

Add Ubuntu's universe repository.

Install the php-fpm module along with an additional helper packages.

Create a MySQL Database and User for WordPress

Log into the MySQL, with root user

Create a Database for your WordPress site.

Create user account, set a password, and grant access to the database.

Flush privileges.


Install WordPress

Make tmp directory to download WordPress archive.

Download WordPress.

Extract contents.

Create website directory.

Move WordPress contents to your new website directory.

Update permissions so www-data owns everything.

Setup New Server Block

Create New Server Block

Create your new site config file inside the /etc/nginx/sites-available directory.

Create symbolic link from new server block configuration to sites-enabled directory.

Unlink the default configuration file from the sites-enabled directory.

Test new configuration file.

Reload Nginx.

Set WordPress Config

Copy wp-config-sample.php.

Create upgrade directory, so WordPress won't run into permission issues.

Fix file permissions.