How to set up a WordPress self-hosted website from scratch

Do you want to start a website but have no idea where to start? Let me show you how to set up a WordPress self-hosted website from scratch.

Do you want to start a blog or a website, but you have no idea where to start?

Creating a website can seem very daunting and confusing. There are so many options and so many factors to consider.

How much do you want to pay? How customisable do you want your website to be? Do you want to have a shop? What about a blog? Do you want to give users the ability to set up accounts?

Whenever someone comes to me to ask me for advice about starting a website, or a blog, I always recommend WordPress.

WordPress is probably best known for being a blogging platform, but it is so much more than that. It’s a content management system (CMS) that allows you to create websites with themes, plugins and widgets; many of which are available for free. You can even set up a shop with WordPress using WooCommerce.

But don’t just take my word for it! 29% of the web runs on WordPress (source), including websites like MTV News, Sony Music, the Walt Disney Company, and The Rolling Stones.

In this post, I’m going to show you how to set up a WordPress self-hosted website from scratch. 

Please note: This post is not sponsored or a collaboration, but it does contain affiliate links. This means if you make a purchase after clicking one of the links in this post I may make a commission off this sale at no extra cost to you. I only recommend products and services that I use and love myself.

This post was last updated on 30th May 2018. 


Ok, this post is HUGE! There’s a lot of information in this post because I don’t want you feeling lost at any point. So here are some links to the various sections in this post to hopefully make life a little easier for you.

1 | Choose a suitable hosting package

First things first, you will need to purchase a hosting package from a web host. A web host provides the space online where all the files that make up your website will live. 

For hosting, I highly recommend Namecheap. I’ve been a custom of Namecheap for around 7 years, and I’ve found their prices to be very reasonable, their up-time to be fantastic and their customer service to be unbeatable. I honestly recommend Namecheap to everyone!

There are two types of hosting options that you may want to look into on Namecheap.

The first is a hosting package designed specifically for those wanting to set up a self-hosted WordPress website. This package is called EasyWP and is currently $8.88 (USD) for the first year, and then $48.88 each year after that (for a US datacenter).

The second option and the one I use and recommend is shared hosting. I currently have the cheapest plan with is called Stellar (previously Value).

I personally think this package is a better value for money as it has more storage space than the EasyWP package and it also allows you to have 3 websites running off the same hosting package. This is great for me as I can host this website, my own personal blog and my boyfriend’s website all on the same package!

Namecheap shared hosting options | HollyPryce.com

Note: The price of hosting packages often changes.

When you have decided which package is best for you, choose whether you would like to pay monthly or yearly (yearly works out cheaper in the long run) and whether you would like to be hosted by a datacenter in the UK or one in the USA. It is more expensive to be hosted by a datacenter in the UK, but Namecheap advises choosing a datacenter that is “closer to your potential audience”.

Once you’ve chosen your hosting period and datacenter location, click Add to Cart. On the next page, you will be prompted to select a domain. That brings us nicely on to the next section…

(Side note: It is possible to get free hosting online, but I don’t recommend it! Once upon a time, I used a free host and they deleted my entire website without warning. Yeah…not good.)

2 | Choose a domain

As I say, the next page you will see after choosing your hosting package on Namecheap will ask you to select a domain.

Namecheap choose domain | HollyPryce.com

A domain is basically your website’s URL. So my domain is hollypryce.com, for example.

Some people say that you should think of hosting as a house, and the domain as the address of that house.

There are a few options on this page:

  • I want to get a FREE .website domain
  • Purchase a new domain
  • Use a domain I own with Namecheap
  • Use a domain I own from a registrar

1 | I want to get a FREE .website domain

When you purchase a hosting package with Namecheap you have the option to register a free domain with the .website extension.

This is a viable option, but be warned that this .website domain is only free for one year, and then you will have to pay for it!

2 | Purchase a new domain

If you don’t already own a domain and need to purchase one, this is the option you will need to choose. I’m going to talk you through this in a second.

3 | Use a domain I own with Namecheap

If you already own a domain with Namecheap that you would like to use with the hosting package you have chosen, choose this option. This will then prompt you to log in to your Namecheap account to select a domain.

4 | Use a domain I own from a registrar

It is possible to use a domain that you own with another registrar. If you choose this option, you will need to set up a Namecheap account, if you don’t already own one, and then enter the domain you would like to use with the hosting package you have chosen.

If you need to purchase a new domain…

For the purpose of this tutorial, I’m going to talk you through the “Purchase a new domain” option.

After you choose the “Purchase a new domain” option you will be asked to enter the name of the domain (with the extension i.e. .com, .co.uk, .info, etc) that you would like to purchase.

Namecheap new domain | HollyPryce.com

You should make sure your desired domain is available first by searching for it here. If it’s available, that’s great! If not, you might need to choose a different domain or a different extension.

After entering your domain, choose the number of years you would like to register it for, then click Add New Domain to Cart.

Namecheap domain in cart | HollyPryce.com

Now your cart should contain your hosting package and your domain. Click Continue in your basket when you are ready to pay.

When you view your basket you will be able to see all the information about the products you are about to purchase. You’ll notice that a small charge has been added on called ICANN fee. This is because ICANN (Internet Corporation for Assigned Names and Numbers) charges a mandatory fee each domain that is registered, renewed or transferred.

Namecheap cart | HollyPryce.com

You will also notice that something called WhoIsGuard is enabled. When you purchase a domain, you have to provide personal details such as your address, phone number and email address. This information can be accessed by anyone online, but having WhoIsGuard will protect this information and it won’t be freely available.

You normally have to pay for WhoIsGuard, but the good news is, as of May 2018, Namecheap now give WhoIsGuard to all of their customers for free forever! That will save you some money! Unfortunately, it is not available for the majority of regional domains, such as .co.uk.

One more thing before you check out; make sure you check the Namecheap promo codes page for discount codes. If you find a code that you can use, copy it, pop it in the promo code box, then hit Apply. You’re welcome!

When you are happy, click Confirm Order. You will now need to log in to your Namecheap account if you already have one, or create a new account if you are new.

Eventually, you will get to a checkout page where you can pay for your domain and hosting.

And that’s it! You now own hosting and a domain! Make sure you check your emails as you will be sent lots of important information that you will need for the next step of the process.

3 | Install WordPress

Log in to cPanel

Once you have purchased your hosting and domain through Namecheap, you will receive some emails including one containing all the information about your hosting package.

If you look through this email you will find the details of your cPanel account, including the URL of your cPanel account (it should be something like http://YOUR-URL.com/cpanel), a username and a password. cPanel is a web host control panel that gives you access to manage various aspects of your website.

Open your cPanel account in a new tab and use the username and password provided in the email to log in.

You will be able to change your cPanel password once you’re logged in. Just click on the person icon at the top of cPanel account and selecting “Password & Security”.

I recommend you take some time to explore the cPanel interface as it has lots of great features.

One of those features is Softaculous. Softaculous is a script library, and it allows us to easily install various scripts, like WordPress, without having to deal with any code.

Install WordPress using Softaculous

When you are ready to install WordPress, look for the section in cPanel called “Softaculous Apps Installer” which might look something like this:

Or, if your cPanel account is set up to use the old theme, it might look like this:

Click on the WordPress icon to see all the details about installing WordPress. Click on Install Now.

Now it’s time to fill in your details.

First, choose your protocol. If you have purchased an SSL certificate for your domain, choose the https:// option. If not, just leave it as it is.

Next, choose which domain you want to install WordPress on. If you only have one domain associated with your hosting, then this domain will already be selected.

In the next step, you need to decide whether or not you want to put your WordPress installation in a directory (folder).

You don’t have to put your WordPress installation in a directory, but I almost always do. A WordPress directory is usually called “wordpress” or “wp”. So in this box, just type in the name of the directory/folder you want to put your installation in.

Next up is site settings. Choose a name for your website and write a short description of what your website is about. Don’t worry too much about what you write here because you can always change the name and description at a later date.

Then, you need to set up your admin account. Create a username, a password and enter an email address that you want to be associated with this WordPress installation.

Finally, choose your language and then scroll down to the bottom of the page and click Install. Now we wait while the installer runs.

You may have noticed that we skipped a few steps. Don’t worry! We’ve set up everything we need to set up to get our WordPress website up and running.

4 | Log in to your WordPress admin area

To check that WordPress has been installed, log in to the WordPress admin area. To do this, you will need to go to the login page, which has a URL that looks like this:


Make sure you replace “YOUR-URL” with, you guessed it, your URL.

If you installed WordPress in a directory, you will need to go a slightly different URL to log in:


Just replace “YOUR-WORDPRESS-DIRECTORY” with the name you chose for your WordPress directory. So if you called your directory “wordpress” you’d replace this with “wordpress”.

This should take you to a page that looks like this:

Here you will need to type in the username and password that you chose for your WordPress account when setting it up via Softaculous.

If all has gone to plan, you should be able to see your WordPress dashboard after logging in. Woo-hoo! You’ve successfully set up a WordPress website!

If you’re new to WordPress, you might want to spend some time getting yourself familiar with the interface. I also recommend you check out this post about the 10 things that you do after installing WordPress.

If you’ve used a directory…

If you did choose to install WordPress directory, the URL of your WordPress site will be:


But what if you want your URL to just be your domain, without the directory name at the end, like:


Well, there’s a little bit more work to do!

Firstly you need to log in to cPanel again. Now, look for the File Manager icon that looks like this:

Once the file manager opens, look for the directory called public_html. Double click on this to enter it.

In the public_html directory, we need to create a new file. So do this, click on the File button in the top left-hand corner.

When prompted to enter a name for your new file, enter the name “index.php”. It is very important that this is the exact name you use. When you’ve entered that, click Create New File.

Your new index.php file will appear in the list of files. We now need to edit it, so right click on index.php and select Edit. A pop up might appear after to click Edit. Just click Edit on this in the bottom right-hand corner.

Eventually, you will see a blank text editor. In this, copy and paste the following code.

define('WP_USE_THEMES', true);

You will need to update the part of the code that says YOUR-WORDPRESS-DIRECTORY and replace this with the name of your WordPress directory. Once this is done, click Save Changes.

Then head back into your WordPress admin area, in the left-hand menu click on Settings then general. You should see a screen that looks like this:

Here, you just need to edit your Site Address (URL) and all you need to do is remove the name of the directory from the URL so it is simply your domain name, as shown above.

Do not edit WordPress Address (URL)!

And that’s it! Your WordPress website will now show when you visit your domain.

Do you now feel ready to set up your own WordPress website from scratch? 

Pin for later?