An easy way to test WordPress is to use localhost installation and install WordPress into $HOME/website
directory. An example:
tar -xzvf wordpress-5.0.2-fi.tar.gz
mv wordpress $HOME/website
To set permissions go into $HOME/website directory and run
cd $HOME/website
sudo find . -type d -exec chmod -R 775 {} \;
sudo find . -type f -exec chmod -R 664 {} \;
Check that permissions are the right
stat -c '%a %A %U %G %n' *
Add yourself to the www-data group
sudo usermod -aG www-data username_here
PS. replace username_here using the real username
Make a symbolic link to the /var/www/html
sudo ln -s /home/username_here/website /var/www/html
PS. replace username_here using the real username
Make an user and database via phpMyAdmin
Install WordPress
PS. With 5-based WordPresses may be some problems, so version 4.9.9 is a well workable version.
https://wordpress.org/news/category/releases/
https://wordpress.org/download/releases/
Read also: https://puolanka.info/goto/apache-and-phpmyadminin-installation-in-ubuntu-mate-and-mint-19/
Read also 2: To fix grey or white screen death in WordPress 5