How to Install WordPress App on a Linode VPS on Ubuntu 18.04

After spending a long time on SSH console, Speed testing tools, and web hosting panels; I figured out a server stack that you can use to host a Fast WordPress website. Hosting a WordPress site is not a big task if you know how to get a shared hosting plan from Interserver. But when you want to ultimately control your web server and manage it at your own to host WordPress, you need to know the best stack.

Here’s what I have explained in this tutorial.

Deploying a Linode cloud server with Ubuntu 18.04 (You can choose any other OS but Ubuntu is best)

Nginx as webserver

Php7.4 FPM

Installation of PhpMyAdmin and accessing it through your domain

Uploading WordPress using SFTP (Filezilla)

Setting up Varnish Cache on Nginx

To start with, you can deploy a VPS on Linode for 5$ a month. The configuration of such VPS would be 1v CPU, 1GB RAM, 25GB SSD storage and 1TB bandwidth.

You have to make sure every rule is not commented out. if the comments are there, just select the whole content on the file and replace with the above content. (after replacing the bold characters with your values)

sudo nginx -t

You can test the server block file for any syntax error using above commands. If the command returns “syntax is OK”, proceed to the next command and reload the Nginx Server.

sudo systemctl reload nginx

Now, the server is setup. Lets install PhpMyadmin

sudo apt-get update

sudo apt-get install phpmyadmin

Lets link to Phpmyadmin

sudo ln -s /usr/share/phpmyadmin /var/www/mydomain

sudo phpenmod mcrypt

Do not panic if the above command does not work. Let’s move the next.

sudo service php7.4-fpm restart

Let’s change the phpmyadmin dashboard location. I will simply navigate to my document rule and make a link to the phpmyadmin there.

cd /var/www/html

sudo mv phpmyadmin database

I have used database only to rename the phpmyadmin link inside the document root, you can use anything to keep it secret.

Open yourdomain/database to verify the install.

So far, we have installed Nginx, PHP 7.4 fpm, MySQL and phpmyadmin on the Ubuntu 18.04.

Now is the time to access your MySQL through SSH and create a database, a new database user, and grant all permissions to that user.