08-07-2018, 02:57 PM
I'm hoping to perfect the shortest number of steps for beginner users with a Windows and cPanel background, from receiving the password for a VPS to installing a WordPress blog.
Any one game to figure out the shortest, easiest and safest way? Idea being to help first time users of Linux coming from an environment of Windows and cPanel to set up a WordPress Website with the shortest number of fool-proof and safe steps.
_______________________________________________________________________________________
Here are my steps for a VPS that has CentOS 7.0 minimal installation on it:
Step 1: Create SSH Client access with PuTTEY
https://www.putty.org/
Step 2: Fire up PuTTEY Put IP in and make sure Port is 22 (unless your provider has given you a different port) - user is always root and the password given to you.
Step 3: For security change password to a very strong one (you can generate the new password at https://passwordsgenerator.net/)
Exit PuTTEY after password change and test the new password (always exit when you're not using PuTTEY):
Step 4: Create DNS for the domain you're going to use with the VPS
You can create name servers at Cloudflare - but I prefer to create my own private name servers at my Domain Registrars. Here is how you create your own name servers with one IP at Namecheap. Don't forget to add those newly created name servers to the domain after you have created them. You have to create the name servers and then add them to the domain you will be using of the same name.
https://www.namecheap.com/support/knowle...-my-domain
Here is a video of how to do it at NameSilo.com - much more user-friendly steps than NameCheap:
Wait for the DNS of the domain to propagate. It can take anything from a couple or more minutes to 72 hours.
Step 5: Create a Web Panel that you can use in Windows - I choose VestaCP because it uses little resources and has great speed
Fire up PuTTEY first - then use the following VestaCP install commands.
Note: For the above bash command replace yourdomain.com with the domain you're going to use. Replace [email protected] with a valid address for VestaCP communications and yourpassword with the password you're going to use. Make the password a complicated random one as strong as the one you created earlier for your root - but definitely not the same one. Create a system or Namepad file for keeping all of the passwords of your VPS in a secure location.
Also note: For security I excluded e-mail and FTP in the bash installation command - you can use SFTP with FTP manager like FileZilla instead of setting it up with VestaCP. And use a third party e-mail manager like Zoho for e-mails. VestaCP comes with Fail2ban that is already set up for you after you have installed the panel. If you want to include FTP and e-mails you can generate your own bash command at https://vestacp.com/install/ (scroll down to advanced install settings)
Step 6: Set up VestaCP
VestaCP will give you login details at the end of the installation - fire up VestaCP in Windows.
First thing to do is to add the name servers you created for your domain to the "Package". Package link can be found in the top index links.
Then click on WEB and on your domain - if you hover your mouse over right top of window the edit link appears. Change name server to the one you created. Save it.
Then click on the DNS link and check the name servers are the correct ones.
Step 7: Create a Database with VestaCP
Easy to do - just click on the Database link in VestaCP . You'll see a green PLUS sign on the left side of the Window - click on that and then complete the fields. Make a record of the database name, user name and password for use later when you start your WordPress site. Note that VestaCP includes _admin to the names - you need to copy those names as they appear in VestaCP in their complete form.
Step 8: Create WordPress installation
You can create WordPress from the command line using your PuTTEY SSH client:
You should now be able to get the WP set-up installation page through windows by typing yourdomain.com in the index line. Just follow the steps.
Note: Be careful when it says to create a sub-directory "wp" - to delete "wp" so it's a blank field - otherwise your WordPress site will go to the sub-domain yourdomain.com/wp instead of straight to your domain yourdomain.com.
Also note that if you have a recent cache in your browser of the domain at a different IP you need to clear all history first and preferably flush the DNS - or you can use a new/different browser that is unfamiliar with the domain history.
Step 9: Optional - All-in-one WP Migration & Backup tool
If you want to move the contents of an existing WordPress site or copy a WordPress site you already have to the above installation all you need to do is load the plugin below in the original installation of where the site is:
https://wordpress.org/plugins/all-in-one-wp-migration/
Export the contents of the site in the origin by clicking the export link and saving it to a file directory in your computer. Then after installation of your WordPress at the new IP, add the WP Migration Tool plugin to the new WP Installation and then import the backup directly from your computer by clicking on the import link. Note: it's very important to remember the login and password of the original destination as when you access the backup it will be looking for that specific password - i.e. the ones that will be in the database of the imported WP site. What I usually do is to start the new installation with the original name and password of the WP site I want to import into the new WP installation. Also don't forget to save the permalinks TWICE after the contents have been imported.
Note that the above backup, clone and migration tool is for smaller sites. For bigger sites you may want to look at more sophisticated backup tools like UpDraftPlus.
https://wordpress.org/plugins/updraftplus/
Any one game to figure out the shortest, easiest and safest way? Idea being to help first time users of Linux coming from an environment of Windows and cPanel to set up a WordPress Website with the shortest number of fool-proof and safe steps.
_______________________________________________________________________________________
Here are my steps for a VPS that has CentOS 7.0 minimal installation on it:
Step 1: Create SSH Client access with PuTTEY
https://www.putty.org/
Step 2: Fire up PuTTEY Put IP in and make sure Port is 22 (unless your provider has given you a different port) - user is always root and the password given to you.
Step 3: For security change password to a very strong one (you can generate the new password at https://passwordsgenerator.net/)
Code: (Select All)
passwd
Exit PuTTEY after password change and test the new password (always exit when you're not using PuTTEY):
Code: (Select All)
exit
Step 4: Create DNS for the domain you're going to use with the VPS
You can create name servers at Cloudflare - but I prefer to create my own private name servers at my Domain Registrars. Here is how you create your own name servers with one IP at Namecheap. Don't forget to add those newly created name servers to the domain after you have created them. You have to create the name servers and then add them to the domain you will be using of the same name.
https://www.namecheap.com/support/knowle...-my-domain
Here is a video of how to do it at NameSilo.com - much more user-friendly steps than NameCheap:
Wait for the DNS of the domain to propagate. It can take anything from a couple or more minutes to 72 hours.
Step 5: Create a Web Panel that you can use in Windows - I choose VestaCP because it uses little resources and has great speed
Fire up PuTTEY first - then use the following VestaCP install commands.
Code: (Select All)
curl -O http://vestacp.com/pub/vst-install.sh
Code: (Select All)
bash vst-install.sh --nginx yes --apache yes --phpfpm no --named yes --remi yes --vsftpd no --proftpd no --iptables yes --fail2ban yes --quota no --exim no --dovecot no --spamassassin no --clamav no --softaculous yes --mysql yes --postgresql no --hostname yourdomain.com --email [email protected] --password Yourpassword
Note: For the above bash command replace yourdomain.com with the domain you're going to use. Replace [email protected] with a valid address for VestaCP communications and yourpassword with the password you're going to use. Make the password a complicated random one as strong as the one you created earlier for your root - but definitely not the same one. Create a system or Namepad file for keeping all of the passwords of your VPS in a secure location.
Also note: For security I excluded e-mail and FTP in the bash installation command - you can use SFTP with FTP manager like FileZilla instead of setting it up with VestaCP. And use a third party e-mail manager like Zoho for e-mails. VestaCP comes with Fail2ban that is already set up for you after you have installed the panel. If you want to include FTP and e-mails you can generate your own bash command at https://vestacp.com/install/ (scroll down to advanced install settings)
Step 6: Set up VestaCP
VestaCP will give you login details at the end of the installation - fire up VestaCP in Windows.
First thing to do is to add the name servers you created for your domain to the "Package". Package link can be found in the top index links.
Then click on WEB and on your domain - if you hover your mouse over right top of window the edit link appears. Change name server to the one you created. Save it.
Then click on the DNS link and check the name servers are the correct ones.
Step 7: Create a Database with VestaCP
Easy to do - just click on the Database link in VestaCP . You'll see a green PLUS sign on the left side of the Window - click on that and then complete the fields. Make a record of the database name, user name and password for use later when you start your WordPress site. Note that VestaCP includes _admin to the names - you need to copy those names as they appear in VestaCP in their complete form.
Step 8: Create WordPress installation
You can create WordPress from the command line using your PuTTEY SSH client:
Code: (Select All)
cd /home/admin/web/yourdomain.com/public_html
Code: (Select All)
wget http://wordpress.org/latest.tar.gz
Code: (Select All)
tar --strip-components=1 -xvf latest.tar.gz
Code: (Select All)
rm latest.tar.gz
Code: (Select All)
chown admin -R *
You should now be able to get the WP set-up installation page through windows by typing yourdomain.com in the index line. Just follow the steps.
Note: Be careful when it says to create a sub-directory "wp" - to delete "wp" so it's a blank field - otherwise your WordPress site will go to the sub-domain yourdomain.com/wp instead of straight to your domain yourdomain.com.
Also note that if you have a recent cache in your browser of the domain at a different IP you need to clear all history first and preferably flush the DNS - or you can use a new/different browser that is unfamiliar with the domain history.
Step 9: Optional - All-in-one WP Migration & Backup tool
If you want to move the contents of an existing WordPress site or copy a WordPress site you already have to the above installation all you need to do is load the plugin below in the original installation of where the site is:
https://wordpress.org/plugins/all-in-one-wp-migration/
Export the contents of the site in the origin by clicking the export link and saving it to a file directory in your computer. Then after installation of your WordPress at the new IP, add the WP Migration Tool plugin to the new WP Installation and then import the backup directly from your computer by clicking on the import link. Note: it's very important to remember the login and password of the original destination as when you access the backup it will be looking for that specific password - i.e. the ones that will be in the database of the imported WP site. What I usually do is to start the new installation with the original name and password of the WP site I want to import into the new WP installation. Also don't forget to save the permalinks TWICE after the contents have been imported.
Note that the above backup, clone and migration tool is for smaller sites. For bigger sites you may want to look at more sophisticated backup tools like UpDraftPlus.
https://wordpress.org/plugins/updraftplus/