1.) Create /var/log/apache2/”your web site name”  : This is in your /etc/apache2/sites-available/config file for the virtual host

2.) create /var/www/”your web site name/public_html” : This is in your /etc/apache2/sites-available/config file for the virtual host

3.) in /etc/apache2/sites-available, I create “your web site name”.conf

4.) I give the /var/www/”your web site name” chown to your user to copy in stuff.  When done, chown www-data:www-data for the site.   I use Ubuntu.  Redhat is different.

5.) I usually put the new domain in my Let’s Encrypt certificate and generate a new certificate and apply it to everything first.  

6.) Set up .htaccess in wp-admin for only your require ip that are inside your network or you VPN with
sudo wget https://wordpress.org/latest.tar.gz
Then extract the package using: sudo tar -xzvf latest.tar.gz

7.) I copy the wordpress folder contents to the public_html folder and after the site is up delete the latest.tar.gz file.  You won’t need it.   The “your web site”.conf file will point to the public_html folder.

8.) Open PHPMyAdmin on the server and create the WordPress database and SQL User for the wp-config.php file

9.) Create the salt :  https://wpbuffs.com/wordpress-security-keys-salts/

10.) Go into your site’s wp-admin and configure the web site and set it up.

Last thing:    I move the wp-config.php file
Move the wp-config.php inside wp-admin to /home/”my user/”your web site”/config.php”

I change the wp-config.php file in WordPress to:

<?php
include(‘/home/”your name”/”your web site”/config.php’);      Point it to the correct location where you moved the file to.  
?>