Posts Tagged ‘hosting’

Help my WordPress was Hacked! Now What?

Welcome to my blog, please feel free to subscribe to my RSS feed, join me on Twitter or leave a comment.

First off, don’t panic. That might seem like simple advice or even bad advice but after your website was hacked, the last thing you want to do is panic or try doing this too quickly.

Step One when dealing with a hack is to determine where that hack is.

When I’m called in to help get a hacked website back together, the first thing that I do is disable all the plugins and see if the vandalism goes away. If it does, the hack is in one of the plugins and I simple reactivate them one at a time until I find the culprit.

If it’s not in the plugins, I download a fresh theme from WordPress.org and install it on my website, this allows me to see if the hack is in my theme files. If it is, simply reinstalling my theme will solve the problem.

Using a tool like phpMyAdmin, I scan the database for keywords and common phrases which might point to a database insertion.

Finally, I test the WordPress files themselves. A lot of hackers attach their rubbish to the core WordPress files these days, to clean them up I simply replace them all with a fresh install.

What to do next?

If you suspect your website has been the victim of a hack, the most important thing to do is replace all your current usernames and passwords with clean ones.  Make sure to include:

  1. FTP & Hosting Control Panel
  2. WordPress Admin
  3. Database Connectivity

Afterwards, ensure you’ve deleted all non essential user accounts in WordPress and be sure to follow my guide to securing WordPress.

Why are websites so hard to make?

Wow, I’ll tell you honestly that one of the questions I tend to get asked a lot (and drives people to my website) is Why is a website so hard to make? Actually, that question (or a version of it) accounts for a few unique visits every day so to help answer the question, I’ve explain a few of the reasons that websites are so hard (or expensive) to build.

First, the Web is inconsistent.

This is possibly the worse news for people just starting out, but it’s the horrible and sad truth. Web sites are nothing more than code, it’s not terribly complicated once you understand the basics of it but it’s still just a bunch of gobbly gook until it’s read by something else … and there’s the problem. Each ’something else’ is different. Web code is read by popular web browsers such as Internet Explorer, Safari, Chrome and FireFox but that’s only the tip of the iceberg because Internet Explorer has several versions in common operation today (versions 5,6,7 and now 8) which all display the web dramatically differently. 

Once you get past the basic issue of browsers, you need to think about operating systems. How many computer operating systems can you name? Obviously there’s Windows and Mac right? Great … except … you also have Windows Vista, Windows XP, Windows ME, Windows 2000, Windows NT, Windows 7 and Windows Lite to content with, Macintosh OS X Leopard and Macintosh OS X Pather. That’s got to be it right? Not so fast, what about Linux and Unix? There are hundreds of variations of computer based operating systems, each running one of a dozen web browsers for countless combinations but at least that’s all there is to worry about … except for handhelds (iPhones, BlackBerries, Windows Mobile Devices) and gaming consoles (Nintendo Wii, Microsoft XBox, XBox 360, Sony PSP, Sony Play Station 3) and TV based internet consoles … I hope that I’ve made my point, one of the reasons the Internet is complex to publish for is because there are too many “things” to publish for, instead we’re forced to practice failing gracefully.

The Web lacks a standard language.

Problem number two for somebody just starting out in the great big world of the web is that there is no standard programming language for the Internet. At it’s core, the World Wide Web is programmed in a language called HTML right? Everybody knows this, except it’s wrong.

The web is published in a language called xHTML which is based on HTML, but some people in the community didn’t agree with xHTML so they created other strains of HTML. As a result, we have HTML 1.x, HTML 2.x, HTML 3.x, HTML 4.x, DHTML, xHTML, xHTML 1.1 and xHTML 1.1 SE. Soon we’ll also have xHTML 2.0 as well as xHTML 5.0 … don’t ask.

Now, as we discussed above, there are at least a few dozen major operating systems and each of those has at least a handful of web browsers, plus a ton of mobile devices all designed to interpret some or more of the languages that the web is built on but it’s important to note that not all web browsers agreed on which standards are acceptable or for that matter which codes, structure, text or tags from any standard would be accepted. As a result, a web page developed to be viewed in Microsoft Internet Explorer 5 may (or may not) be visible in other web browsers including other versions of IE.

Scripting on the Web

Now, once you get past the basic problem of coding for some browsers while ignoring others and you pick one of the standards to adhere to, you’ve got to take the time to start writing more than simple content and for that you need what’s called a scripting language of which … there are many.

Most scripting languages such as PHP, Python, ASP, ASP.net etc. execute on the web server (where the website is hosted) but some such as JavaScript execute on the web browser after being downloaded (not to be confused with Java which is not a scripting language but a programming language and completely different). These scripts are what power everything from a simple email form to complex social media giants such as FaceBook.

After you’ve picked the scripting language you wish to use and ensured that it’s compatible with your hosting account (where you store your website for others to access it) you’re all set and ready to start building your first website.

How to handle it all

I’m lucky, I’ve been building websites since 1996 which means that in my very (very) long career I’ve seen countless technologies come, go and die. So my advice to people getting started in the industry is a lot like Benjamin’s in Animal Farm, Web Masters much like Donkeys know that times change but stay the same, simply pick your standards and be the best developer in that selected field. You will be mocked, scorned, insulted and ignored by others in the industry for your choices but in just a few years … everything you know will be outdated and you’ll have to relearn new tools anyways so don’t worry so much.

“Only old Benjamin professed to remember every detail of his long life and to know that things never had been, nor ever could be much better or much worse – hunger, hardship and disappointment being, so he said, the unalterable law of life.”

- George Orwell, Animal Farm,

Billings Time Management and Invoicing Software for Macintosh

Over the month of February, I asked all my regular readers to help me build a better website by telling me how I could improve my website or pointing me to better articles, I have to say honestly that I was overwhelmed by the feedback. Many of you send me private emails with great resources and I want to say thanks to everybody who contact me. As a prize to the best contributions (which I have to admit I randomly selected because everybody was so helpful) the fine people over at Marketcircle agreed to give away three copies of Billings, the most awesome time management and invoicing software for Macintosh.

Billings 3 isn’t about accounting, it’s a time management tool for designers which feels more like an extension of the Mac OS than an account tool. The interface is easy to learn and uses standard iTunes style drag and drop functionality. In fact, the tool appears to be built from the ground up to take advantage of the Mac OS by integrating directly into Mail and Address Book.

billings mactinosh invoice 245x300 Billings Time Management and Invoicing Software for Macintosh imageThe software comes complete with some stunning templates to make your invoicing less about accounting and more about your companies image, which of course is important to any designer. There are around 30 templates to choose from or you can use the invoice designer to create a unique theme for your business.

invoicing2 Billings Time Management and Invoicing Software for Macintosh imageSending an invoice is as simple as clicking the button, Billings will then ask you if you’d like to print the invoice, save it to PDF or automatically open Apple Mail to email the invoice to your client.

Improved Wordflow

What’s unique about this particular package is the integration between client management, estimates and invoicing. A typical work cycle for a project outside of Billings involves me tracking most things on paper or spread sheets, leaving dozens of emails marked unread to indicate which tasks have yet to be accomplished but with Billings, I simplify the process using the following steps:

Create a New Client

 

Using the Mac OS, Billings shares details

Using the Mac OS, Billings shares details

Before I can send an estimate to a client, I need to create them as a client but there’s no clunky copy and paste with Billings I simply right click the client’s name in Email and add then to the Address Book. Once the new client is in my Mac OS address book, I import them into Billings. That way, if I change their details in one application (Mail, MS Office, Billings etc) their details are automatically changed in Billings.

 

Create an Estimate

mac quote 286x300 Billings Time Management and Invoicing Software for Macintosh imageNow that my new client is in Billings, I can create a quote using the internal quote tool pictured here. Billings allows me to set my overall billing rate for all clients as well as specify my rate per client and per project. Another benefit is that it allows me to quickly offer my client a discount or if they deserve a PITA (pain in the ass) tax I can quickly do it here.

The quote also allows me to set taxes for individual clients or projects, set this specific quote to be billable or “for my eyes only” which allows me to track time regardless of if clients see the final bill or not.

estimate 150x150 Billings Time Management and Invoicing Software for Macintosh imageThe resulting estimate is automatically formated and transfered to my email application so that I can easily customize my message and send it off to the client.

Working on the Project

Once my client has accepted the estimate, I can begin the project by clicking a simple iTunes style button labeled Start Working. Pretty complicated so far right? It gets better.

tracktime2 Billings Time Management and Invoicing Software for Macintosh imageEach job is controlled by a series of timers, you can have as many timers as you’d like per job or you can add fixed rate items such as hosting or domain name registrations to the final tally. Timers are used to calculate actual time on the project and can be set to round to the nearest minute or time interval. If I get up to run an errand and leave the timer running, Billings automatically stops the timer and prompts me to deduct the time I was away from the computer.

Once I’ve completed each timer, I accept the charges or choose to mark the time as non billable, which allows me to track a lot more than my client ever knows and improve my billing capacity down the road. Dr. Michael Markovitz, the CEO of Yorkville University once told me that without data you can’t run a business, that’s sound advice for running a multi million dollar company or a small consulting team.

timed billing Billings Time Management and Invoicing Software for Macintosh image

Invoicing the client

invoicing21 Billings Time Management and Invoicing Software for Macintosh imageinvoice for chris 231x300 Billings Time Management and Invoicing Software for Macintosh imageNow the fun part, sending the bill … it’s actually a snap with the built in One Click Billing system. Basically, you click the button and send the bill by email or printing it out.

The same system works for generating monthly statements or reports and it’s this simplicity that has done a few things for my small business:

  1. Now I know how much time tasks take
  2. I can produce estimates faster than other designers
  3. My estimates are based on information, not hopeful projections
  4. I can track outstanding tasks and complete assignments in a timely manner
  5. My invoicing is stream lined
  6. My mortgage is paid.

Frankly, I think that last one is very important but more importantly for me is that because Billings makes my life easier, I can focus on what matters … getting jobs done and spending time with my family instead of fighting with other billing software.

Reporting Tools

billings for february Billings Time Management and Invoicing Software for Macintosh imageWhat I actually love about Billings is that it tells me what I need to know in simple, easy to understand language such as the brilliantly named Billed & Collected report displayed here. 

It tells me what I billed and what I collected. Brilliant.

Other reports let me quickly see who still owes me money, which accounts have retainers applied and who’s accounts are behind schedule or are costing me more money per project or task.

You can download a copy of Billings on a 21 day trial to see for yourself.

How to Secure Your WordPress Website

Running a WordPress website is one of the easiest ways to run a high quality, free web site content management engine but since there are millions of other websites running the same software, there are lots of bad guys out there who would like nothing more than to break into your website. So how do you stop them? In this article I’ll examine some processes your blog should implement to ensure it’s more secure than the ‘out of the box’ version of WordPress.

Basic Security

Plugin Directory

Step One of any WordPress security installation is to hide the contents of the plugin directory. By default, WordPress ships with the directory exposed (it can be found by typing http://[yourwebsite]/wp-content/plugins/) but this allows the bad guys to see what plugins you’re running and possibly take advantage of them. To solve this, simply upload an empty file named index.html or index.php into the base plugin directory.  Another very easy way to do this for your entire WordPress site is to simply add Options -indexes to your .htaccess file. This tells your web server to never list directory contents.

Quick Note: .htaccess files are funny things, they don’t have a filename in the traditional sense so when you download them, all you download is the extension (filename.extension). This can make working with them tough. What I like to do is rename the file -.htaccess or something similar before downloading it, which allows Windows computers to properly interact with the file.

Limit Access to the Admin

Step Two of the basic plan of attack is to limit access to your administration tool. An .htaccess file is a server level control file, meaning that it interacts with the web server before it interacts with a web browser, what we want to do is limit the IP addresses of computers to your wp-admin directory. Need a more basic explanation? Each computer on the internet has a unique Internet Protocol (IP) address made up of four numbers ranging from 0 to 256 for example, 123.456.123.456 this number reflects your unique signature on the Internet. What we want to do is control which computers can access your account.

To do this, first we need to know what your IP address is. Luckily there’s a website for that at http://whatismyipaddress.com/ which will tell you what your current IP address is. After you have that, create a new file called .htaccess on your desktop and add the following code to it:

AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName “Access Control”
AuthType Basic
order deny,allow
deny from all
allow from [paste your IP address here]

Once you upload that code to your wp-admin directory only computers from the IP address you specified will be able to access your WordPress admin directory. You can add multiple allow from lines to ensure you can access your site from work or home. If you ever need to access your admin panel from outside the IP range, simply comment (place a # symbol) before the deny from all line and you’ll be able to access it normally.

One final note here, since many people have dynamic IP addresses (they change whenever you reboot your internet connection) you might want to check with your Internet Service Provider to determine their IP range. For example, once you know that your IP address is always 142.167.66.[0- 255] you can use the allow from address of 142.167.66.* so anybody in your local subnet group (the last octal) can access your admin directory. A little less secure but still better than allowing the whole world to access it.

An Extra Level of Password Control

password protect directory 300x199 How to Secure Your WordPress Website imageJust like the .htaccess file can be used to limit access from specific IP addresses it can also be used to force a server level username and password check before prompting you to input your WordPress username and password. You can do this fairly easily if you’re hosting with BlueHost or if you’re using another hosting company you can create a secure login using an .htaccess file and .htpasswd files or the AskApache Password Protect plugin. This process is a little more complex but a great extra layer of security.

Change Your Admin Account

By default the most powerful account on your WordPress website is called admin, since everybody in the world knows this they only need to guess your password but if you change the admin account name, you make guessing both your username and password infinitely harder. One other point here, since your password is case sensitive (A and a are different letters) you should always use long, complex passwords that mix uppercase and lowercase letters, at least one number and if possible a symbol such as an ampersand (&) or dollar sign. The more complex you make your password, the less chance somebody will guess it.

WordPress Version

Some WordPress themes include a line such as <meta name=”generator” content=”WordPress <?php bloginfo(’version’); ?>” />  in the header.php file. While this is great for WordPress it’s a security blunder since you’re announcing to the world which version of WordPress your using and if it’s not the most recent … which security holes your website is vulnerable to. Simply remove this line from your header and you’ll be more secure.

 

WordPress displaying security issues

WordPress displaying security issues

The next step when it comes to security with regards to versions is to always upgrade to the most recent version promptly. I recommend upgrading your website (and your plugins) as quickly as possible after a new release has been updated.  You’ll see from the graphic to the right that my hotel web design company Getaway Graphics hasn’t had some of it’s plugins or base code upgraded in weeks, this is a major security flaw which could lead to hackers gaining access to my files. Luckily, I did this to demonstrate the potential flaws and the site is actually perfectly safe.

Always upgrade your website and your plugins to the most recent version after you have done a backup of your site files and data. As a bit of shameless self promotion, let me pipe in here that for a fairly reasonable fee, I can do this for you on a monthly schedule or train you how to maintain and monitor your website.

Secure Your .htaccess file

I think we’re now all aware how powerful the .htaccess file is correct? Great, so let’s secure it simply by adding the following code to the very bottom of the file:

<Files wp-config.php>
Order Deny,Allow
Deny from All
</Files>

This simple piece of code makes it impossible for people to see all the security customizations you’ve done to your blog.

Report Issues

WordPress is, at it’s heart a community project. If there’s something wrong and you discover it, send a bug report immediately so the team can fix security holes. This will make the software more secure both for you and the rest of the WordPress users.

Security Plugins for WordPress

Beyond the common sense security steps outlined above, there are several plugins related to security which every WordPress website should be running:

 

  • Login Lockdown – records failed attempts to access your WordPress admin panel. Frankly, if you don’t know people are knocking on your door … how do you know to protect it?
  • WP Security Scan – tests your website for common security holes.
  • WP Database Backup – backs up the content of your database regularly. Not really a security tool but it will allow you to restore to a previous version if you ever need to.
  • AskApache Password Protect – add a password to your wp-admin directory.

 

Other Great Sources

While I was putting together this article, I had help from some other sources on the net including:

One Final Note …

wordpress How to Secure Your WordPress Website imageThe steps I’ve outlined in the above article are all fairly straight forward and necessary to ensure a strong, safe WordPress blog but I appreciate some people simply lack the technical confidence to perform the steps effectively. I’m available as a WordPress consultant and can generally perform all the necessary upgrades to your WordPress website quickly, effectively and easily so why not give me a call?

How do you put together a great website without a web designer?

All this week I’ve been posting about how easy it is for non technical people to register their own domain name and how to setup a website using Blogger, WordPress.com or even BlueHost but what about the next step? How do you publish your own web page without hiring a web designer? More importantly why I telling you how to do all this stuff yourself, after all isn’t this how I make a living? No. Oddly, I make my money consulting people how to make money on the web, not how to setup small websites. Most of my professional time is spent building websites that are called web applications or developing web marketing strategies, not putting together sites for people. When I do build websites for clients, I work with charities or not-for-profits who can benefit from my experience.

So, how do you put together a great website yourself? The first step is to be honest with yourself. Ask yourself:

  • Do you have the technical knowledge to edit HTML?
  • Are you creative enough to build a website?
  • Would it be easier in the long run to simply pay somebody to do it?

That last one’s a doozy isn’t it? If you have absolutely no money the choice is easy … do it yourself but how much should you expect to pay for somebody to help you get up to speed? Most technical people charge either by the project or by the hour, so how much should it cost to get a completely non technical person (somebody who’s terrified of using any of this) from 0 to 60? That depends … let’s take a look at what’s involved:

  1. Registration of your domain name – If you already know what domain you want (you’ve searched on GoDaddy and found it) … 15 minutes.
  2. Setup of your domain at BlueHost or a similar hosting company – 30 minutes assuming everything goes wrong.
  3. Pointing the DNS servers to BlueHost, 15 minutes maximum.

So far, for all the technical set up you’re looking at one hour of time. Most qualified web designers can do all of this for you for $30-$50, depending on their experience level and rates. So for everything so far you have to ask yourself, would it be easier in the long run to simply pay somebody to do it?

Next is the choice between a static HTML website or using something like the WordPress engine to power your website. Both have advantages and disadvantages. Static HTML is just that, it’s code written in a tool like Dreamweaver and uploaded to your hosting company. No fuss, no problem and there’s a ton of free tutorials how to do it yourself. Alternatively, using a tool like WordPress which is far more technical to get installed and running but once setup, it’s easier to use and … it’s free.

Pre Installed WordPress at Bluehost

Pre Installed WordPress at Bluehost

A lot of hosting companies already have WordPress pre-installed with a service called Fantastico, all you need to do is log into your control panel and click the button. When you start a new installation, it’ll ask you a few technical questions such as:

  • The domain you’d like it installed on
  • Administration user name and password you’d like to use
  • Your website name and a description

Press a button and it’s done. Now you have a fully featured WordPress installation complete with content management system and blogging package … in about twenty minutes. Doing it yourself in HTML is still an alternative but honestly, it’s a little like driving a car with standard transmission … technically it’s better on milage and you’re more in touch with the mechanics of the car but why would you do that to yourself willingly?

Congratulations! If you’ve followed my tips so far this week you’ve registered your own domain name, setup a hosting account, pointed your domain name to your hosting account and installed a content manager on your website. All that’s left is for you to take the time to write your website and publish it to the world!

Tomorrow I’m going to talk about using WordPress as a Content Management Tool for business and non-profits, how to add pages and content as well as reorder your pages. Why not check back tomorrow or sign up for my email notification or RSS feed to be notified as soon as I post it?

It’s easy to setup your domain name you don’t need to be an expert.

Setting our GoDaddy settings to point to BlueHost

OK so the other day I wrote about the fact that you don’t need to hire a web guru to setup your website using something like Blogger, WordPress.com or BlueHost and yesterday I told you how to setup your own domain name such at a hosting company like GoDaddy or Domains At Cost but how do you combine them? Again, this is painfully simple and not just for spiffy web guys like me. Anybody can do this, so lets take a quick look at how it’s done.

In this example, I’m going to assume that you’re hosting your website at BlueHost and you’ve registered your domain name with GoDaddy, if you’ve done it else where the steps should be fairly simple to modify with a little bit of common sense and reading their Frequently Asked Questions section.

First … we need to point the domain name to the hosting company. We do this by logging into GoDaddy and editing something special called the DNS records. You can find this under your account Domain Manager. If you have multiple domain names, it will display a list and prompt you to select the one you’re looking to modify. At the top of the domain profile, there’s a button called Name Servers, we’re going to click that and expose the Custom Name Servers option where we simply type the name servers for BlueHost. The name servers for BlueHost are:

  • ns1.bluehost.com
  • ns2.bluehost.com
BlueHost setup process

BlueHost setup process

Once that’s done, setting up your hosting account at BlueHost takes about 15 minutes and requires very little technical knowledge.

Now that you’re in the Add Domain screen, specify the name of the domain you wish to setup and the wizard should fill out the rest of what you need for you.
Please note, in order to assign a domain to BlueHost the first step at GoDaddy must already be complete, sometimes this takes a few hours so my advice is after you’ve completed the process at GoDaddy take a couple of dollars from the money you just saved and go have a coffee.
Now you’re done. Your website will take between 24 and 48 hours to propagate which is a fancy Internet term for point to the right place. Once it’s done you’ll be able to setup your own emails and put up a website at your new address, which I will talk about later this week  so why not sign up for my email notification or RSS feed to stay connected.
In the interest of being honest, BlueHost pays me to refer people to them but I’d do it anyways. While you’re waiting for me to write something else, feel free to comment on any of my existing articles.

Using MAMP and LAMP for WordPress Development

My FTP program is a time thief. Sometimes when I’m in the middle of a major edit, it’ll hang or crash or simply refuse to do what I’m asking it to. More often than not however it will simply choose to take seconds to do what I want it to do in a fraction of a second.

What am I going on about? Frankly, sometimes my tubes are clogged and FTP’ing changes to my web host takes far too long. It’s not their fault, I live in a city with free high speed WiFi access virtually everywhere in town. This is great but it means that I do a surprisingly large amount of my work sitting in coffee shops, on park benches or along the river. The bad part is that it’s a public WiFi so I’m reluctant to use FTP passwords across the network and sometimes it’s a little slower than I’d like.

My Solution? MAMP, Macintosh Apache MySQL PHP, it’s available from http://www.mamp.info/en/index.php and it’s free. There’s also Windows and Linux versions of the tool but since I’m a MacHead I choose to use the version best suited for me. What MAMP does is install the equivalent of a Linux web server on your computer, which allows you to host your own WordPress websites on your local computer for development purposes.

To do this, first you’ll have to download the MAMP installer and set it up on your Mac (remember, there are PC versions called LAMP). Next, copy your WordPress website in the /Applications/MAMP/htdocs/ directory and set up your local copy of WordPress as you normally would.

If you already have a copy of WordPress running on your hosted blog, use your phpMyAdmin control panel to export your database and install it on your laptop. Next, download and edit your local copy of wp-config.php to have the following settings:

define(‘DB_NAME’, ‘intranet’); // The name of the database
define(‘DB_USER’, ‘root’); // Your MySQL username
define(‘DB_PASSWORD’, ‘root’); // …and password
define(‘DB_HOST’, ‘localhost’); // 99% chance you won’t need to change this value

If you’ve done everything correctly, you can now access a local copy of your WordPress website from http://localhost:8888/wordpress/.

Remember, changes to your local blog *do not* update your hosted blog but this is a great way to make edits to your templates, test local content and develop client websites in a localized, hosted environment.

For bonus coolness, if you setup your Adobe Dreamweaver site correctly you can make edits to your themes without having to upload anything to a web server. I know this is a sad confession but I use this technique regularly while sitting in airport terminals.

I’d love to be able to sync my live blog directly with my local offline copy every now and then, so that I can always have a fresh copy on my MacBook. What would you do?