Host Website On Our Own Server – Web Server Setup Series

Today we’ll continue our web server setup series. In this series, we’ve already installed and setup our web server, configured & secured cPanel and point domain name to the server. At any time if you’ve trouble setting something up something, let me know in the comment section below. In this article, we’ll go about hosting a website on our server. Let’s do it.

Setting up a website is as simple as uploading a single file on our server. We can write a simple HTML page and it’ll work. But to make this article more informative, we’ll setup a WordPress site.

Host website on our own server

First, we need to login to our cPanel user account that we created in the previous article.  Remember that the user login URL is http://server-ip:2082 not http://server-ip:2030. Note that port 2030 is for admin panel and 2082 for user or client panel.

Picture

After logging in, we’ll see the dashboard divided into three easy to understand sections. From the sidebar, go to Domain > Domains. Click ‘Add a New Domain‘ button, enter your domain name, the directory path (just enter the domain name after ‘/’ in directory field) where we’ll host our website files and lastly, keep the checkbox unchecked for now.

add domain to cpanel

Click “Add a New Domain” to finish adding domain. Now everything is done. We’ve our server ready to point domain to our hosting.​Now we’ll follow the same process that we did in the last article. We will point our domain name to this server by creating an ‘A’ record.

create a record google domains

After adding ‘A’ recording on domain, we need to wait 5 – 10 minutes.

Install WordPress on server

We’re not done yet. We’ve pointed our domain to the hosting but it’ll throw an error or show a default server page. We now need to install WordPress. We can install WordPress easily using our cPanel.From sidebar of cPanel, click Addons > WordPress.

install wordpress cpanel

Right now we’re not setting up ssl certificate so we’ll go with http://. In the second field, select the domain for which we’re installing WordPress and the third field, leave it blank.In the language section, select the preferred language of your site. The last section, leave it as it is but copies everything somewhere at a secure place or remember if you’re good at it. We’ll need a database username and password to login to our database using phpMyadmin. So just remember all the database details.

​Finally hit ‘Install’ and it’s done. The process will start and may take up to 4 minutes. Now visiting the website will through an error like this –

wordpress database connection error

This error means that WordPress is installed but database connection isn’t set. For this, open the file manager from cPanel sidebar and move over to the Website directory.

edit wp-config wordpress

Here you’ll have a file named ‘wp-config.php‘. Now edit this file by clicking the icon from the right side. Just edit password field.

wp-config edit password

In wp-config.php everything is pre-configured. The only thing needs to enter is the password. This is the password that we created in this step. Now save the file, take a deep breath and visit your site. If you did everything as explained, you should see the following WordPress setup wizard.

wordpress setup wizard

This setup wizard is extremely easy. Select your language and click continue. The next screen asks site information such as Site title, username, and password. Enter everything carefully and remember the username and password as we’ll need it to login to the WordPress admin panel.

wordpress installation

Finally, click install WordPress and that’s it. Believe me, it is all. The next screen is the login screen.

Picture

Enter WordPress credentials and hit Log in. There you’ve admin dashboard to manage your site. From here you can create new pages, blog posts, monitor blog comments and everything else that’s necessary for website administrators. If you need more functionality, then you can install from hundreds of plugins.

wordpress admin dashboard

The end of the tutorial

Believe it or not, it’s the end of this tutorial. This article was a little long but covered all the basics necessary. If you need any help regarding any step, then let me know in the comment section below. And now I’m going to delete the server that I setup for this tutorial. Don’t ping the server IP, it doesn’t belong to me anymore. 🙂 See you in the next part of this series.

Leave A Reply

Your email address will not be published.

2 Comments
  1. email customer support says

    I am new reader here, in website hosting and i have no much more idea about how to setup web server series but after reading this post my all doubt is clear.

    1. Mohd Sohail says

      Nice. I am glad that the article helped you. Thanks for reading!

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. AcceptRead More