Download and install Virtualbox
Download Ubuntu ISO
Setup Virtualbox using Ubuntu ISO
Login to Ubuntu
Open up terminal
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install lamp-server^
create MYSQL admin user and password
sudo systemctl start apache2
sudo systemctl enable apache2
sudo apt-get install php7.1 php7.1-mysql libapache2-mod-php7.1 php-common php7.1-cli php7.1-cgi php7.1-json php7.1-opcache php7.1-readline php7.1-common php7.1-gd
sudo a2enmod php7.1
sudo systemctl restart apache2
sudo nano /var/www/html/info.php
<?php
phpinfo();
?>
open localhost
sudo rm /var/www/html/info.php
mysql -u root -p
CREATE DATABASE “wordpressdb”;
CREATE USER “wordpressuser”@localhost IDENTIFIED BY ‘password’;
GRANT ALL PRIVILEGES ON “wordpressdb”.* TO ‘wordpressuser’@’localhost’ IDENTIFIED BY ‘password’;
FLUSH PRIVILEGES;
exit
cd~
wget http://wordpress.org/latest.tar.gz
tar xzvf latest.tar.gz
sudo mv ~/wordpress/var/www/html/
sudo chown -R www-data:www-data/var/www/html/
sudo chmod -R 755 /var/www/html/
cd ~/wordpress
cp wp-config-sample.php wp-config.php
sudo nano wp-config.php
define(‘DB_NAME’, ‘wordpressdb’);
define(‘DB_USER’, ‘wordpressuser’);
define(‘DB_PASSWORD’, ‘password’);
define(‘DB_HOST’, ‘localhost’);
sudo systemctl restart apache2.service
sudo systemctl restart mysql.service
open web browser: localhost/wordpress
add from server plugin