Ionut Cornea
Posted on December 22, 2020
Understanding how to host a website on the internet it might be kind of tricky and difficult at first. Have no worries, I will break it down for you, in small understandable steps. đ
In this tutorial Iâm going to use Plesk as a control panel, so letâs start!
How to host a website with a Hosting Company?
So before we dive deeper into the subject, letâs try first to understand what âhost a websiteâ means.
Imagine you are a small business owner and you want to open a small store where you want to repair smartphones. In the era that we live in, itâs crucial to have an online presence, therefore a website is a must-have.
After you build your website you want to deploy it on the internet and to do that, you need a web server.
Now, here you have two possibilities, you either build your own server and host your website on it. You either decide to pay an annual subscription to a web hosting company so they host your website on their servers.
Not sure about you folks, but personally, Iâd prefer to pay a small amount of money to have a hosting package (space on the server), where I can host my website. With a decent amount of money, around 20-30 Euros/year, you can easily have a basic hosting package where you can install different CMS platforms, eCommerce websites, or deploy traditional websites.
It is important to know that in the 20-30 Euros, you will have a shared server, which is a server built to host hundreds, if not thousands of customers. If you would like to build a serious business, I strongly recommend you to try out a VPS (if your budget is limited). A secondary option would be a Dedicated Server if the budget is not really a problem.
You are interested in a good quality hosting provider? Look no further and check the website https://hostadvice.com/.
What is Plesk?
Now that weâre familiar with âHow to host a websiteâ, letâs dive deeper and see what Plesk is.
Plesk is one of the most popular web hosting control panels in the world along with Cpanel.
Great advantages that Plesk has over Cpanel are: Plesk is available on both platforms, Windows, and Linux, but Cpanel is only available for Linux. Another advantage for me personally is the fact that Plesk has a better UX/ UI than his rival, Cpanel.
Traditional website vs CMS?
Here it depends on the technical skill of each person. If you are a developer you most likely would like to build the website from scratch yourself. However, if you have no technical background, you might consider choosing a CMS platform, like WordPress, Joomla, Drupal, etc. Or if you would like to build an online store, you most likely want to use Prestashop, Magento, Shopify, etc.
The advantage of a traditional website is that you can add whatever feature you want and you have freedom in customizing the website the way you want.
If time is crucial for you and you have no technical background, then a CMS platform is just perfect for you. It can be installed in just a few clicks. Other benefits would be: you receive weekly / monthly new updates that will increase the security of your website.
How to install WordPress on Plesk?
Firstly you must have an active subscription with a hosting provider who does use Plesk as their control panel.
After you log in to the platform, click on Applications -> Type âWordPressâ in the search bar and hit âEnterâ, then click âInstallâ. After you choose the domain/subdomain on which you prefer to install it.
After the installation has been finished, you will receive your username + password for your /admin platform of WordPress (or the CMS youâve installed). Normally, if everything went well, you should already have your own website live and deployed on the internet, congrats!
Now, that is a basic WordPress installation. You have to customize your website and install several plugins and a theme that youâd like to use. I wonât go further with this subject. If youâre interested in this, leave a comment.
How to upload website files on Plesk?
First, click on the preferred domain/subdomain, then click on âFile Managerâ. After you can either click on â+â or you can drop the files directly in the root of the domain/ subdomain.
Congrats, now your website is live on the internet!
What I like about Plesk is the fact that it has Git integrated (yes, I know Cpanel as well, but I like Plesk more)
If you are wondering what Git is, then read the following => Git is a version control system. With Git we can track changes that we make to the files. We can have a record of the history of the changes that weâve made. If we broke the code and nothing works anymore, have no fear! We can also revert the changes using Git. However, if youâve deleted the production database by accident. There isnât undo for that, youâre fired. đđ€Żđ
To learn more about Git.
Now, letâs say we make an update on our website locally, how do we push the update live on the internet?
Yes, youâre right! Via GIT! â
As well via FTP⊠đ
FTP (File transfer protocol) is a technology that permits transferring files from one system to another via the internet. In this case, we can use FTP to upload/ download files from our web server.
The FTP account can be set inside the Plesk panel. As FTP software you can use Filezilla for example, which is available for all platforms, Windows, Mac, Linux.
Back to GIT now!
Plesk does offer you a really useful feature. You can create your own repository and with few Git commands, you can push your new updates live, on the internet.
To create the repository click on âGitâ on the homepage. Decide between the location of the repository. You can choose between Github / Local. In my example, I am going to choose âLocal Repositoryâ.
If you are a beginner with Git, or you do not remember the commands, you can click on âHelpâ.
Below are instructions on how to initiate a local repository and how to update an existing repository.
Optional: You can create a secondary branch and push the updates on this new branch, instead of the master branch.
Create a repository:
mkdir example
cd example
git init
git add fileName
git commit -m âinit repository commitâ
git remote add origin https://example@mywebsite.examplewebsite.com/plesk-git/mywebsite.git
git push -u origin master
Existing Git Repository:
cd existing_git_repo
git remote add origin https://example@mywebsite.examplewebsite.com/plesk-git/mywebsite.git
git push -u origin master
After you have pushed your commit to the server, you can see the new branch created by clicking on âClick branch and pathâ. You can select the desired branch and by doing that, your changes will be live on the server.
The possibility to check the âCommit Logsâ is available, to see the history of all your commits.
This is the end of the article, hopefully, you find it useful.
Find my previous article: Do I need to understand DNS as Web Developer?
Do not hesitate to come and say hi! đ
My Twitter
My Dribbble
Posted on December 22, 2020
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
June 13, 2023