How To Set Up a Self-Hosted WordPress Blog – A Case Study

 

This post follows on from Lianne’s recent post on setting up a free WordPress hosted blog, which details the easier option of using WordPress’s free hosted solution. Where this post differs is that it explains how to set up your WordPress blog on your own servers. Firstly, a couple of definitions:

  • WordPress hosted blog – this is the free option that WordPress.com offer. You use their servers and your domain looks like www.yourdomain.wordpress.com
  • Self-hosted – this means that you pay for a server yourself and host your blog on there, which allows your domain to look like www.yourdomain.com
  • Domain name – in this context, your domain name is simply the name of your website.
So this blog will focus on the second option, running through a case study as I set up my own WordPress blog with my own custom domain name. The other main advantage of the self-hosted option is that you have complete control over the customisations available (and can even edit the code directly yourself, if you feel so inclined).


Domain Name

One of the best things about the self-hosted option is that you can choose your own domain name, which you can register for anything from 1 or 2 years, up to 10 years at a time. The easiest thing to do regarding a domain name is to register your domain as you set up your hosting, so that there is one transaction and one point of contact (if you are doing this, just skip down to the Hosting Provider section below).

It is not atypical, however, for people to want to secure their domain way before they sort out their hosting, normally to avoid other people grabbing the domain before them. If this is the case, not to worry, it is fairly straightforward to transfer your domain over to your hosting provider later on.

You will need to decide what domain name you want for your blog. From a personal branding perspective, your full name would be a great place to start, but if you have a common name it may be difficult to obtain. In this case perhaps use your social media username (which will be consistent across platforms now, right?), add in a middle name or initial, or simply come up with your own ‘brand’ name.

There are plenty of websites that will sell you domains; I happen to like 123-reg – if you head over there you can do a domain search for the name of your choice. Enter the domain you want and search for it, you will be given lots of options and suggestions with different endings – the ‘.com’ or ‘.co.uk’ bit – which is known as the Top-Level Domain (TLD). Choose the option that best suits your purpose and go ahead to purchase it. In my case I will go for patrickhathaway.co.uk & patrickhathaway.com. I will use the .com version and just keep the .co.uk version so no one else can have it!

Hosting Provider

There are also hundreds of sites out there that can offer you hosting solutions. For your first blog, you really don’t need anything fancy, and there are plenty of decent cheap options. You can compare prices and view ratings through sites like who is hosting this.com. I will use Eco Web Hosting as I’ve used them before, and they support a green message which makes me feel marginally better about driving down the road to the chip shop grocery store.

At this stage you can register your domain directly or transfer a domain registered elsewhere. In my situation, I don’t want to transfer my domain patrickhathaway.com as I will have to pay extra for this, so I will choose to maintain my domain services through 123-reg but use web hosting through Eco Web Hosting (option 2 in the screenshot below).

 

For your first blog, you only need a very basic hosting package. With my hosting provider, this corresponds to the ‘starter’ package and is relatively cheap.

 

The most important factor is that your hosting solution offers at least one database, as you require this to install and run WordPress. You can also check the latest WordPress requirements on their website.

If you are not sure, try emailing the hosting company’s support and asking the question.

Optional Extras

Most hosting solutions will offer you lots of optional extra features, that you don’t really need for your first blog. The only one you may feel is important is the domain privacy option. As a domain name owner you are obliged to provide contact information, which is known as the WHOIS information. Other internet users can search websites such as http://who.is/ to find out details about a website owner – which means that your personal information is publicly available, such as your home address or email. If you are concerned about this you can pay an additional charge to opt out of WHOIS.

Once you have selected your extras and added payment details, you are almost ready to go. You will receive an email with lots of different login options and setup details. It would be sensible to keep all of these details in a spreadsheet – I have set up an example Google Doc which you can use/copy.

Administering Your Account

Your web host will give you access to a control panel which will allow you to control most aspects of the administration of your account. Examples of these include webmin, cPanel and plesk. I have used all 3, and find cPanel the easiest to use, which is one of the reasons I chose Eco Web Hosting as they offer cPanel access.

Before I do anything else I need to change the records of my domain (which I registered earlier through 123-reg) so that they point at my new server.

When I registered my domain with 123-reg, I was sent login details for their control panel. Once I’ve logged in, I can click through to my domain patrickhathaway.com and choose to change my ‘nameservers’ to those of Eco Web Hosting.

 

I need to select ‘Change Nameservers (DNS)’ under the Advanced domain settings. 123-reg required me to unlock my domain before I could transfer it. This is very straightforward, so once unlocked it is simply a case of adding in the nameserver details that Eco Web Hosting emailed to me.

Once you have elected to change nameservers, they can take up to 48 hours to propagate, but often it is a lot quicker than this.

FTP Access

So now we have a domain name for our website, and we have some webspace where our website will live. Once we’ve installed WordPress on the server, this will provide the content of the website.

In order to install WordPress on your website, you will need to setup FTP access. FTP stands for File Transfer Protocol, and allows you to transfer files from your home computer onto your website over the internet. You will be emailed FTP details which consist of a server address, username and password. The server address will be in the form of an IP address (e.g. 94.168.44.11). With these details you can connect to your web host using an FTP client such as FileZilla. Most servers will require you to unlock FTP access, either by a specified time period or for an unlimited time for a specified IP address address.

 

If you unlock by IP you can set FTP access only from your own home – check your home IP address at whatismyip.com

Setting up WordPress

In order to install WordPress on your server, you will need to define a database for WordPress to connect to. Using cPanel, this is quite straightforward (check WordPress support if you are not using cPanel):

  1. Log in to your cPanel.
  2. Click MySQL Database Wizard icon under the Databases section.
  3. Under ‘Create a Database’ choose a username and password, then click ‘Create’. Note down your database details on your spreadsheet.
  4. Now, under ‘Manage MySQL Databases’ lower down the screen you will see your database listed.

A website is defined by a set of files that exist on a server. In order to transfer files back and forth between your local computer and your server you will need to set up a local website folder. In my case I simply setup a folder on my desktop called ‘patrickhathaway.com’.

Download the latest version of WordPress, then unzip the file and transfer the contents into your local website folder. Next, you need to do a bit of coding. Don’t worry it’s not real coding, you simply need to add your database details to the wordpress files. Find the file ‘wp-config-sample.php’ from your local website folder, right click on it and choose to open the file with Notepad (or indeed, any text editor). Then you just need to edit 3 pieces of data:

 

Replace both ‘database_name_here’ and ‘username_here’ with the username of your database that you just defined through cPanel (these will be the same value). Then enter your password in ‘password_here’. Leave your hostname set as ‘localhost’.

Note: do not delete the quote marks.

Now, simply save this file back into your local website folder as ‘wp-config.php’ (i.e. remove the ‘sample’ bit).

Connecting To Your Server Via FTP

We will now need to connect via FTP and transfer across the WordPress files.

It is very straightforward to connect to your server via FTP, simply download free FileZilla software, fire it up then choose ‘File->Site Manager’. Add the FTP access details emailed earlier:

 

Once you have a successful connection, you are ready to transfer files. The rest of the FileZilla panel is split in 2, the left hand side represents files on you local computer, and the right hand side shows the files on your server.

On the left hand side in the box called ‘Local site’, browse to find your local website folder (in my case ‘patrickhathaway.com’ on my desktop). You should see all the WordPress files your just transferred in there (these contain lots of files starting with ‘wp’, such as ‘wp-admin’).

On the right hand side, click the public_html folder icon. Your screen should look something like this:

 

The only file in your public_html file will be one called index.html – this is simply a default homepage for your site and what will display if you try and browse your website on the internet. Right click and delete this file.

Highlight all of the WordPress files in the left hand panel, right click, then hit ‘Upload’. It will take a few minutes to transfer all the files across. Once it has finished check the log files on the bottom left of FileZilla to make sure there were no failed file transfers.

Activating WordPress

To confirm that the files have uploaded correctly, log onto your cPanel and click the ‘File Manager’ at the top. You should be able to browse through your directory structure until you see the wp files. Next, run the WordPress install script by putting http://yoursitename.com/wp-admin/install.php into your internet browser (so in my case, http://patrickhathaway.com/wp-admin/install.php). If everything has gone to plan, you should see a screen that looks like this:

 

Give your website a title, then pick your username and password. These will be the details you use to log onto your website to make changes through WordPress so make sure they are memorable. Add these 2 final pieces of data to your spreadsheet in the last two columns. Then hit ‘Install WordPress’ and log in!

Get Blogging

So that’s that, you have now purchased your own domain name, set up a server and installed WordPress on the server – you are ready to start blogging. Check back on Lianne’s tips for explanations on the various WordPress options, you’ll soon figure out the basics. Over the next few weeks as I customise my blog I will be adding further walk-throughs that describe how you can make your blog look more professional. If you had any problems with the set-up process or any other questions, please post them in the comments below. You can see my working blog at patrickhathaway.com which will progress as I add features and content. Right, I’d better go and write my first blog post then!

3 thoughts on “How To Set Up a Self-Hosted WordPress Blog – A Case Study”

  1. Great blog series idea Patrick!

    This first stage of building a website/blog is the stage that is most bewildering to many.

    I look forward to seeing how far you go with this blog series… It has the potential to be a monster guide and could take the user from beginner to advanced if done well enough. You could take it as far as you like i.e. customising the WordPress theme and link building etc.

    You just earned IdeasByNet a new email subscriber. ;)

    Cheers

    1. Hey Adam thanks very much, glad to hear it. I agree that the initial set up is the bit that would most likely get abandoned half way through when you get stuck.

      I’ve already started the next post as I begin to customise my personal blog – it’s not too bad as I just write it up as I go along. I’ll be bringing in themes, plugins and widgets in the next post for sure.

      Further down the line I’ll be doing the basics of SEO (on-site), Authorship, Twitter cards and all that jazz. Then it’ll be promotion and analytics.

      Glad you like the idea, supports all the effort that goes into it!

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>