ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel
  • »
  • Technology»
  • Internet & the Web»
  • Web Page & Web Site Development

Hosting your own WordPress website from just $0.99/month

Updated on December 17, 2014
Source

"If something's too good to be true, it probably is." I believe in this saying rather strongly, but let me assure you, you can indeed host your WordPress blog on a third-party host from just $0.99/month.

You may ask: "Why pay when there's WordPress.com?". Indeed, WordPress.com offers a compelling option for a startup blog/website, but it doesn't allow you much option. You can't use your own themes, or even customise the HTML or PHP code of existing themes. Nor can you run Google Adsense (or any other ad provider for that matter) to generate revenue for your blog.

Shared hosting plans usually start from $3 to $4 a month, but restrictions are often applied that may hinder the growth of your blog. Managed WordPress hosting plans provide less restrictions, but are often more pricey. There are also free hosting options available, but honestly, unless your website is disposable, I wouldn't really go with them.

Another option, which we will be exploring today, is using a Virtual Private Server, or VPS. The name sounds daunting at first, but it's really not as hard as it seems. A VPS is much akin to a virtual machine, except that it's connected to the Internet and you access it over the Internet. It provides you with an instance of a Linux distribution (or sometimes Windows) with some amount of RAM and hard disk space set aside for you to do whatever you want with it. Here, our intent is to host a WordPress website with this VPS.

There are managed VPS solutions out there that can help with the installation of the web server and WordPress, and provide web management tools like cPanel at your disposal, but they're usually rather pricey.

Today, what we'll be exploring is the unmanaged kind, where you have to do everything yourself (don't worry, I'll guide you!), but it's really, really cheap. It can even be cheaper than shared hosting plans, but still offer a whole lot more, as you are free from many of the restrictions of a shared webhosting plan, AND you get your very own IP address!

Getting a Domain Name

The first hurdle you have to clear, however, is acquiring a domain name. Now, you have two options around this: dish out a few dollars more for your very own domain name, like a .com, .net or .org, or opt for a free domain.

If you're looking to build up a web presence, purchasing your own domain name is a worthwhile investment. You have full control over it, and search engines are typically more fond of such domain names. I recommend NameSilo, which is the cheapest I've come across so far, and does not resort to confusing pricing tactics like certain other registrars.

Otherwise, you may signup for a free domain name at Freenom. Here, you don't actually own the domain itself, but you at least get some degree of control over it, which is sufficient for our needs. You are restricted to less well-known extensions like .cf and .tk though.

To experiment, I suggest registering a domain name with Freenom first.


Unmanaged VPS Provider

So, back to the $0.99/month deal. Atlantic.net offers a $0.99/month plan that comes with 256MB of RAM, 10GB of SSD space, and 1TB of data transfer. The RAM size is a little small (which is why it's just $0.99/month), but the remaining specifications should beat everything hands down!

Atlantic.net only accepts payment via credit card, which you will have to furnish when you sign up. They will not bill you until the end of the month though, which is a good thing, and the charges are calculated by the hour, so there's really little pressure on you. You can try it for say, eight hours, and you'll only be billed a measly 1c.

I will cover other unmanaged VPS proivders later on, but let's assume first that you want to use Atlantic.net to host your WordPress website.

Setting up the VPS and installing WordPress

After you have signed up, you'll be provided with a link via e-mail to Atlantic.net's cloud control panel.

The first thing you should do in the control panel is to click "Domains" and add the domain you have previously registered. Note that you have to point your nameservers to the one specified on the domain page. Atlantic.net's DNS manager is pretty robust, which is why I recommend you host your DNS records on Atlantic.net rather than on the domain registrar.

After you have done so, click the "Add Server" link on the left hand corner. Type the server name you want, choose your location, click the radio checkbox for the "GO" size (or whatever size you prefer), and choose your operating system. For a 256MB RAM server, I highly recommend Debian 7.3.0 Server 32-bit. Then click "Create Server".

The next page will provide you with the initial login details and password. To log into the system, you will need an SSH client. I recommend PuTTY if you're using Windows. Once you have downloaded PuTTY, enter the IP address, username (root) and password (all provided in the initial login details) and click "Open".

Before proceeding, you should update your DNS records so that your IP address points to your website and vice versa.

To do so, first, go back to Domain Names, and click "Add New Host Name (AAAA)". Then, leave the Host field blank, fill in your server's IP address, then click "Add Host Name". Repeat the same steps twice more, this time entering "www" (without the quotes) and "mail" (without the quotes) in the Host field, and then fill in your server's IP address accordingly.

Next, click "Add New Mail Exchange (MX)" further down the page. Then, leave the Host field blank, enter mail.yourdomain.com (replace yourdomain.com with your actual domain name) under Mail Exchange, and enter 10 under priority. Then click "Add Mail Exchange Record".

Lastly, click on Server PTRs and you should see your IP address listed there. However, we will need to edit the "Points To" link to reflect "yourdomain.com" (without the quotes).

Now, we're done with the DNS changes. Back to PuTTY.

In PuTTY, this is where things get a little confusing. If your impression of an operating system is one with beautiful icons and a mouse, you need you shift your way of thinking. When you're logged into PuTTY, you're actually accessing the operating system itself, just that it's all through the command-line. Think of it as MS-DOS if you are old enough to remember those days.

The first step we should do is to change your password. Type passwd, and then enter your new password twice (it will prompt you).

Then, install the latest updates. You can do so by typing apt-get update followed by apt-get upgrade. The second command might bring you to a page listing a laundry list of certificates. You just need to press the down arrow on your keyboard to reach the end and follow the command to quit that page.

Next, you should edit your hostname. To do so, type nano /etc/hostname and change your server name to your domain name. "Nano" is a command-line text editor and you will have to use your arrow keys to navigate to get to the appropriate line and character. Once you're done, press Ctrl-X to quit and press Y followed by Enter to save the changes. Next, type nano /etc/hosts and change the line which states the server name and replace it with your domain name. Repeat the same steps to save.

Then, you should also type hostname yourdomain.com (replace yourdomain.com with your domain name) to make the hostname changes effective immediately.

Now, as this is a server with only 256MB of RAM, we will need some swap space so we will not run out of memory. To do so, do the following steps (adapted from DigitalOcean):

  1. Type dd if=/dev/zero of=/swap bs=64M count=16 to create a 1GB swap file
  2. Set permissions on the swap by typing chmod 600 /swap
  3. Make the swap by typing mkswap /swap
  4. Turn on the swap by typing swapon /swap
  5. Make the swap permanent by typing nano /etc/fstab and pasting the following code at the bottom: /swap none swap sw 0 0. You can paste code simply by right-clicking your mouse. Save your changes as per usual.
  6. Then, adjust the 'swappiness' settings by typing nano /etc/sysctl.conf
  7. In that file, paste vm.swappiness=10 and vm.vfs_cache_pressure = 50 at the bottom of the file and save.
  8. To make the changes effective immediately, type sysctl vm.swappiness=10 and then vm.vfs_cache_pressure = 50


Now that we've done the foundation steps, it's now time to install the web server. For a low RAM system, you may want to install Apache, MySQL and PHP5 on its own. DigitalOcean has a comprehensive tutorial on doing so which you can see here.

However, for me, I prefer having a graphical user interface and thus prefer having a control panel. The best free control panel I've come across so far is Virtualmin. The interface isn't that user-friendly, but you should get the hang of it after a while.

To install VirtualMin, follow the following steps:

  1. Type wget http://software.virtualmin.com/gpl/scripts/install.sh
  2. Type install.sh
  3. Then, press Y and then Enter on the prompt
  4. If it asks you to enter a fully qualified domain name, type in your domain name (without the www)
  5. Wait for about 10 minutes for all the installation files to be downloaded and installed. It's just that easy!
  6. Once it says that "Done!", open your web browser and point it to https://yourdomain.com:10000 (replace yourdomain.com with your domain). If DNS hasn't resolved, you can also access it from https://<IP Address>:10000. Your username will be "root" and the password will be the one you configured at the very start.
  7. Follow the configuration steps. The defaults should work out, and the MySQL database should be set to the 256MB option. Click the "Skip check for resolvability" on the nameservers page.
  8. After you have initially configured VirtualMin, go to "System Settings" and then "Features and Plugins". Disable BIND DNS Domain, PostgreSQL database, Virus filtering and Mailman and click Save.
  9. Then, click "Create Virtual Server" on the left hand side. Enter your domain name (without www), administration password and then click "Create Server".
  10. Then, click "Edit Virtual Server" and take note of the Home directory and Administrator username as we will need it later on.

All these should get your WordPress web server up and running! Now, let's install WordPress by following the following steps (adapted from DigitalOcean):

  1. Back in PuTTY, type wget http://wordpress.org/latest.tar.gz
  2. Then, type tar xzvf latest.tar.gz
  3. Type apt-get install php5-gd libssh2-php php5-mcrypt php5-curl to enjoy an optimal WordPress experience.
  4. Type php5enmod mcrypt to enable mcrypt as a bug prevents it from being enabled by default.
  5. Next, type sudo rsync -avP /wordpress/ /home/<domainname>/public_html. Replace <domainname> with the one provided under "Home directory" from Step 10 earlier.
  6. Now, type chown -R <username> /home/<domainname>/public_html, replacing <username> with the administrator username from Step 10 earlier and <domainname> with the home directory from Step 10 earlier. This step is essential to allow WordPress to write files to your directory.
  7. Now, fire up http://<your domain name> or http://<IP address> in your web browser and you should see a WordPress configuration page. Your database name and username should be the same as your Administrative Username, and the password is the one you typed in Step 9 earlier. Then, click Next.
  8. Enter your site details and your WordPress details and click Install!

And... we're done! As some settings earlier require a reboot, it's time to type reboot in PuTTY to restart the server. Wait about 5 minutes and try accessing your WordPress installation again.

To optimise your settings for a low RAM server, you may want to look into disabling some unneeded processes or changing certain configuration settings. You may want to try this article.

I'm willing to spend more... do I have any other options?

Yes, you do, and it won't cost you very much!

From Atlantic.net itself, you can upgrade to a 512MB RAM/20GB SSD server for $5/month and a 1GB server for $10/month.

Vultr provides 768MB RAM/15GB SSD for $5/month, with their 1GB RAM/20GB SSD for just $7/month. They offer $5 of free credits, which essentially means your first month is free on the 768MB RAM server. Vultr has servers in the USA, Western Europe, Japan as well as Australia. However, Vultr does not provide any DNS services, so you have to rely on your domain registrar for that.

And you probably have seen me repeatedly referencing DigitalOcean. That's what I personally use, and they were the pioneer of cheap VPS servers and are unlikely to go anywhere anytime soon. They also have a large knowledge base which should help you get started. You can use my referral link to get $10 of free credits when you sign up. DigitalOcean has servers in the USA, Europe, as well as in Singapore. An advantage DigitalOcean has apart from the rest is that they have a "one-click installer" for WordPress, which means you need not bother with most of the steps above!

I need help!

Well, as much as I tried, it's pretty difficult to explain all the steps if you're new to this. I suggest opting for DigitalOcean's one-click installer if you wish to avoid all the hassle.

Otherwise, drop me a comment below and I'll see if I can help you out with the installation if I have the time!

Comments

    0 of 8192 characters used
    Post Comment

    • profile image

      omar21 2 years ago

      Please, from your hub i concluded that you are really good in web stuff, so i want to ask you several questions, and i hope you help me.

      I made a blog on wordpress (!!!!!!!!!!.Wordpress.com), and i want it for business, i want to advertise on it, so is making it enough or i should buy a domain or what, and wordpress itself offers domains so should i buy from it or not?,

      sorry for my bad Writing