Archive for the ‘Web Hosting’ Category

WordPress: Restricting website access to your IP address

For various reasons, you might need to restrict your website to your IP address.
This is particularly useful for development purposes, as it blocks access to the website (or to redirect the visitor somewhere else), while allowing the developer to navigate through it normally.

In order to only allow your IP address to access your website (or blog) and block everyone else from accessing it, just add these 3 lines to your .htaccess file:

order deny,allow
allow from xx.xxx.xxx.xx
deny from all

Simply replace “xx.xxx.xxx.xx” with your own IP address, save your .htaccess file and test it out!
If you can’t find your IP address, simply use WhatIsMyIp.com or any similar site to obtain it (there are plenty of them).

A very efficient way to test if someone is able to access your website through a different IP address is by using a web proxy to access it (such as MegaProxy for example).
To revert the changes and therefore allow everyone to access the website again, simply delete those lines from .htaccess and save the file again.

Why your backup attempts fail in cPanel and other control panel systems – your files can be the problem.

I’ve had the idea to write about this subject a few months ago, and left it on a post it on my desk. Luckily, I have just seen it and didn’t want to throw it away without posting something about it.

In these days, every single web host promises you that your data is safe and that they will backup your site every X days. While this is true, it’s not 100% sure.

Backup systems can fail (they do fail). What if? What if it fails for you?
What if your blog gets hacked, and there’s no backup to restore it from?

Did you even think about that scenario? It happens to hundreds of people. Why shouldn’t it happen to you?

No one is special in technology. It can fail for everyone (look at NASA for example, technology fails for them too). If you care about your website (and your email) you should back it up at least once a month, or once a week if you update it too often.

Most control panels out there will offer you an easy and convenient way of generating/downloading full backups for your website. This should be a 20 minute operation (between the generation and downloading).
Now here’s the tricky part  -  and also why many webmasters do not download a backup of their site every month or every week:

Your site is too large!

I have been a consultant in this industry for a long time, and I know for a fact that most websites do not use over 500M to run, in any circumstances. The problem here is, that webmasters neglect the “file sharing” problem.

You’re given 5GB or 10GB to host files, so you intend to use them for file storage. After all, it’s what you’re paying for, right? Not really.

It’s complicated to talk about it. Web hosts offer that to compete with each other. It’s a normal marketing strategy. A responsible webmaster will not use nowhere near that because having 10GB in files on a site will ruin any self-backup attempt by the website owner.

There are other ways of storing your files online. Let’s say you are a Disc Jockey and want to share your “sets” with everyone. Your main web hosting account is certainly not the best place to upload your files to.

Sure, it’s nice to have a link attached to your set such as djrocknroll.com/setxxx.mp3 but this will add inconveniences to you, such as not being able to generate a backup without a headache, or without having to wait 6 hours for it.

I rarely point at a problem without providing an option to evade it, so here’s what I recommend:

If you need to host files (large files), setup a separate hosting account and use a subdomain for it. For example, files.yoursite.com. Your web host will know how to do this for you. That way, you can separately backup both your files and your site, without having one interfering with the other.

Please note that I am not referring to subdomains. A Subdomain is usually hosted within the same user home directory, so this will not do any good. Ideally, a separate account is recommended.

If you have a reseller or a multi-site account, you can take advantage of it by creating a new account just for the purpose of storing your files. If you do not have this possibility and cannot afford a new account at your current host, you can always find a cheaper web host just to deal with your “downloadable” files. Assuming that your email and website content is more important than your files, you should always make sure that your main hosting account is clean. Never use more room than you need to.

That way, you will be able to generate/download backups every time, with no delays or hiccups. This is valid for almost every control panel system. Whether it’s cPanel, Plesk, DirectAdmin or anything else… if your account is flooded with files, the instant backups will not work as you expect.