- Update your ubuntu system 20.04.
 
    - Install apache2.
 
    - Install mysql database server.
 
    
sudo apt-get install mysql-server
sudo systemctl status mysql # active
sudo -s # be root user root@...
mysql_secure_installation # pwd: YNNNN
sudo systemctl start mysql
sudo systemctl enable mysql
sudo mysql -u root -p
CREATE DATABASE wordpress DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER wordpress IDENTIFIED WITH mysql_native_password BY 'abcdf';
GRANT ALL ON wordpress.* TO 'wordpress'@'%';
    
    - Install PHP.
 
    
sudo apt install php libapache2-mod-php php-mysql
sudo apt install php-curl php-gd php-mbstring php-xml php-xmlrpc php-soap php-intl php-zip
    
    - Download and install wordpress.
 
    
curl -O https://wordpress.org/latest.tar.gz
tar -xzvf latest.tar.gz
sudo cp -R wordpress/* /var/www/html/random.com
sudo chown -R www-data:www-data /var/www/html/random.com
sudo chmod -R 775 /var/www/html/random.com
cd /var/www/html/random.com
sudo mv wp-config-sample.php wp-config.php
    
    - Edit 
wp-config.php file. 
    
DB_NAME = wordpress
DB_USER = wordpress
DB_PASSWORD = abcdf
    
    - Create VirtualHost for wordpress site 
/etc/apache2/sites-available/random.com.conf.  
    
<VirtualHost *:80>
ServerAdmin admin@random.com
ServerName random.com
DocumentRoot /var/www/html/random.com
ErrorLog ${APACHE_LOG_DIR}/random.com_error.log
CustomLog ${APACHE_LOG_DIR}/random.com_access.log combined
</VirtualHost>
    
    - Enable, activate and restart new config with apache2.
 
    
sudo a2ensite dev.rcg.re5q.ai.conf
sudo systemctl restart apache2
sudo systemctl enable apache2
sudo systemctl start mysql
sudo systemctl enable mysql
    
    - Add DNS record to resolver. You should be able to browse it after 10 mins? http://random.com/wp-admin
 
    
random.com -> public_ip