WordPress from Scratch

On a fresh Debian VPN. Per WordPress.org’s own list:

sudo apt install apache2

sudo apt install php

sudo apt install php-curl

sudo apt install php-[the rest of the recommended extensions]

php -m to see a list of the php extensions installed.

sudo apt install mariadb-server

sudo systemctl start apache2

sudo systemctl start mariadb

sudo mysql_secure_installation

mysql -u root -p

sudo apt install httpd mariadb mariadb-server php php-common php-mysql php-gd php-xml php-mbstring php-mcrypt php-xmlrpc unzip wget -y

Backup the Server

To make a backup file, sudo su root then navigate to root directory, and:

tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

Download the resulting file.

To restore:

tar -xvpfz backup.tgz -C /

then, mkdir /proc, mkdir /lost+found, mkdir /mnt, mkdir /sys

reboot