Web presence step by step Chapter 8: Installing and configuring WordPress to create a website

Previous step: Chapter 7: Configuring the SSH server on an Ubuntu Linux cloud server to limit SFTP directory visibility within chroot jail directories
Next step: Chapter 9: Installing and configuring phpMyAdmin to manage MySQL databases

Web presence step by step is a series of posts that show you to how to build a web presence.

In this post, we install and configure WordPress to create a website.

This post assumes that you have performed the steps described in Chapter 7: Configuring the SSH server on an Ubuntu Linux cloud server to limit SFTP directory visibility within chroot jail directories.

A note re MySQL and MariaDB

A few years ago, the company that owned MySQL was purchased by Oracle. The open source code was legally “forked” into a project called MariaDB. When this document refers to “MySQL,” it is actually referring to the MariaDB descendant of the MySQL database engine, made possible by the terms of the GPLv2 open source software license. Notice that to maintain compatibility with existing software, the command to invoke MariaDB on the command line is “mysql.”

Creating the MySQL database for the WordPress site

Use an SSH terminal program to connect to the Ubuntu Linux cloud server you created in Chapter 3: Buying an Ubuntu Linux cloud server from Digital Ocean.

Enter the command:

mysql -u root -p

Enter the commands (choose a password in place of “xxxxxx”):

create user blog01@localhost;
set password for blog01@localhost = 'xxxxxx';
create database blog01;
use blog01;
grant all privileges on * to blog01@localhost;
quit

Downloading the WordPress zip file using Chrome on Windows, MacOS, and Linux

Use the Chrome web browser to visit the following site:

https://wordpress.org/download/#download-install

Click on “Download WordPress 5.7” (the version number may have changed by the time you read this):

The zip file will download to your computer:

Right-click on the icon representing the zip file in the lower-left corner of the browser. Click “Show in folder”:

Downloading the WordPress zip file using Safari on MacOS

(note the zip file’s contents will be extracted automatically by Safari after the download completes)

Use the Safari web browser to visit the following site:

https://wordpress.org/download/#download-install

Click on “Download WordPress 5.7” (the version number may have changed by the time you read this):

Click “Allow”:

Click on the download icon in the lower-right of the screen. Select “Open in Finder”:

Extracting the contents of the WordPress zip file using Windows

Go to the Downloads folder. Right-click on the WordPress zip file. Select “Extract All”:

This dialog will appear. Click “Extract”:

A dialog shows the progress in extraction of the zip file’s contents:

The extracted contents of the zip file will appear as a directory named “wordpress-xxx” (“xxx” representing the version number), within which will be a directory called “wordpress”:

Extracting the contents of the WordPress zip file using MacOS

If you downloaded the zip file with Chrome on MacOS

Double-click on the WordPress zip file:

The MacOS archive manager will extract the zip file:

If you downloaded the zip file using Safari on MacOS

Note that Safari has extracted the contents of the WordPress zip file:

Extracting the WordPress zip file using Linux

Right-click on the WordPress zip file. Select “Open with Archive Manager”:

Right-click on the “wordpress” folder within the Archive Manager. Select “Extract”:

Click on “Extract”:

The following dialog appears:

A note about the example domain and a reminder that you should use your domain name in its place

Note: for clarity and narrative flow we are using the example domain linuxstepbystep.com but you should substitute your domain name as appropriate.

Using FileZilla to transfer the WordPress files to the Ubuntu Linux cloud server

Run the FileZilla file transfer program. Enter the following information the following fields:

Host: linuxstepbystep.com
Username: linuxstepbystep_com
Password: xxxxxx (where “xxxxxx” is the password for the linuxstepbystep_com account)
Port: 22

Click “Quickconnect”:

After connecting, you will see the contents of the server account in the right pane:

In the left pane, select the directory called “wordpress”:

In the right pane, select the directory “linuxstepbystep.com”:

In the right pane, right-click on the “index.php” file. Select “Rename,” enter the value “index.old.php”:

In the left pane, select the directory that contains the contents of the WordPress zip file:

In the left pane, select all of the files and directories:

Right-click on the selected files and folders. Select “Upload”:

Observe the progress of the file transfer in the lower window of the FileZilla file transfer program:

After the file transfer completes:

Configuring WordPress using the web installation wizard

Use a web browser to visit your domain name:

Select a language. Click “Continue”:

Click “Let’s go!”:

Complete the fields for “Database Name,” “Username,” “Password,” “Database Host.” Leave “Table Prefix” unchanged. Click “Submit”:

Click “Run the installation”:

Complete the fields for “Site Title,” “Username,” “Password,” “Your Email.” Do not check the box “Discourage search engines from indexing this file.” Click “Install WordPress”:

Click “Log In”:

The control panel for the WordPress blog software appears.

Note: this control panel can be reached by enterning your domain name followed by “/wp-admin”:

https://linuxstepbystep.com/wp-admin

Enter the username and password you selected earlier in the WordPress setup wizard. Click “Log in”:

The control panel for the WordPress blog software that enables your website:

Use a web browser to visit your domain name. You should see the default WordPress page:

Previous step: Chapter 7: Configuring the SSH server on an Ubuntu Linux cloud server to limit SFTP directory visibility within chroot jail directories
Next step: Chapter 9: Installing and configuring phpMyAdmin to manage MySQL databases