Search

Saturday, July 7, 2012

How to start a blog

How to start a blog - by B.Jones

Friends and family members often ask me how to start a blog, and I always enjoy explaining the advantages of a blog over a traditional website, but it is a lot information to take in over dinner. I thought I would document the process to make it easier to understand.

I recently created a video that documents some of what is discussed in this article.

1. Decide What You Want To Blog About

There are a lot of bloggers on the web already. If you want to attract readers, you are going to need to establish your credibility. Don't just blog about anything. Pick a topic you are are passionate about. Something that you have lots of experience with.

Decide: To Host or Not To Host

When it comes to starting a blog, your biggest decision will be whether you want to host the blog yourself, or use a free blogging service that is hosted for you.


Free Blogging Services
Yes, it's free, but nothing is really free. When you start a blog with a free blogging service, you don't get your own domain. You get something like mygreatblog.blogspot.com (where there are a million other blogs at blogspot.com) and you don't actually own the blog. If you ever do decide to move to your own domain, you have no way to take your readers with you, because you have no control over the site.

Cheap - Host your own blog using WordPress free Blog software
This is the method I suggest, because it offers much more flexibility and freedom to do what you want. You will have your own domain name, like mygreatblog.com. You can get this for as little as $30 per year. In my experience, WordPress is excellent free blog software that allows you flexibility and room to grow.

If you want to go the free blogging service route, check out links to free blogging services. If you want to host the blog yourself, read on.

Find a Domain Name

For me this part is fun. You know what your theme is already, so now you have to find a good domain name.

Find a Web Host for Your Blog

By far, the easiest way to get a website is to go with a hosting company that offers "1 click installs", or instant installations for Blogging and Forum software. Blogs and Forums make it possible for someone with no experience to get good content up fast.


"1-click" (easy) Installation
Dreamhost Hosting
For beginners, I recommend Dreamhost, because they tend to care, where as many other huge hosting companies don't. They cost a bit more, about $119 for a year, but it is worth it. Edit: I actually used a promo code and was able to get 1 year for about $60. Go to: Dreamhost.com and enter Promo Code: WMLGS1 to save $50.

(**New) GoDaddy Blog Hosting
Another great blog host I recently learned about is GoDaddy. They have a 'one click install' Economy WordPress hosting plan that is really a great deal (as low as $3 to $5/ month (that's $36 to $60/ year) depending on how long you sign up for). Go to GoDaddy to check it out.

Install WordPress

Installation Overview If you have experience with installing web applications that use mySQL, this could take as little as 5 minutes to do, and the 5 steps below may be all you need, however, I have further explained each step below for beginners.
  1. Make sure your host meets the requirements. details
  2. Make sure you have a database ready with proper username and password. details
  3. Download and unzip WordPress. details
  4. In the WordPress folder, find and make a copy of wp-config-sample.php. Rename the copy to wp-config.php and fill in your database details. Save the new file. details
  5. Upload all the files to the directory in your web host where you want the blog to live - details
  6. Run the installation file. install-folder/wp-admin/install.phpdetails
Requirements:To run WordPress your host just needs a couple of things:
  • PHP version 4.2 or greater
  • MySQL version 4.0 or greater
Create a Database
You can usually do this in your hosting control panel. If you aren't sure how to do this, ask your hosting company. After you have set it up, you should have 4 pieces of information about the database.
1. Database Name - The name of your database.
2. Username - your database user name.
3. Password - Your database password.
4. Host name - This is going to be a host name. It might be something like mysql.mydomain.com, or just localhost.

Without these 4 things, you won't be able to set up WordPress. Again, contact your hosting company's tech support if you have any trouble with this.
Download the current version of WordPress.
This is easy. Just go to wordpress.org/download/, and download the current version. You have a choice between the ZIP file or the TAR.GZ file. I think the TAR.GZ file may be smaller, but I always download the ZIP.
Uncompress the WordPress ZIP file.
Again this is easy.

Configure WordPress
Open the WordPress folder and rename the file wp-config-sample.php to just wp-config.php. Now open it and insert the 4 pieces of information about your database into the 4 fields below.

Change:
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ... and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
to
define('DB_NAME', 'yourDatabaseName'); // The name of the database
define('DB_USER', 'your-username'); // Your MySQL username
define('DB_PASSWORD', 'your-password'); // ... and password
define('DB_HOST', 'your-hostname'); // 99% chance you won't need to change this value
Choose Your Install Directory and Upload Everything
If you want your WordPress blog in a separate directory of your website, like “yourdomain.com/blog”, then rename the “wordpress” folder to “blog” and upload it to the root directory with an ftp program.

If you want your blog to be in the root directory of your site, meaning the blog will be located at “yourdomain.com”, then just open the wordpress folder and upload all the files and folders into your web root. If you already have a file called index.html, or index.php, you'll need to rename it or get rid of it before you uploading everything.
Finish and Install
8. In a browser, go to the domain where you uploaded WordPress, and then to /wp-admin/install.php, and follow the simple directions there.
You will be given a username and password. Save it in a safe place.
That's it. You now have a new blog. You can now log in with your username and password, and start writing.
Download a WordPress theme
This is the fun part. Picking a WordPress theme. There are many places to find WordPress Themes. When you find one you like, just download it and unzip it just like you did with the WordPress ZIP file.

6. Add Your Theme
You can do this after you upload, but it's probably easier to just do it now.

Look for the themes folder. It's in the wordpress => wp-content => themes.
There should already be 2 theme folders in the themes folder, “classic” and “default”.
Just drop your new theme folder in with them. (remember, it must be unzipped first)

Wordpress Themes and Templates


Here are some wordpress themes:


Brian Gardner ThemesBrian Gardner has created several wordpress themes, both free and paid. They are all high quality.
Brian Gardner Wordpress Themes


New Dirt WordPress ThemesNewDirt Wordpress Themes offers several free, high quality wordpress themes.
NewDirt WordPress Themes


Node Thirty Three DesignSeveral free themes released under the CCA 2.5 license. Many of these are non wordpress, but could still be used to make wp themes.
Node Thirty Three Design


WordPress Theme ViewerWP theme viewer is a compilation of several themes that are available for download.
WP Theme Viewer

Free blogging services


Free Blogging Services



WordPress.comWordPress is one of the best, and most flexible blogging platforms. As well as distributing their blogging software, they also offer free hosting at wordpress.com.
                                Start a blog at WordPress.com


Blogger.com by GoogleBlogger.com is probbably the most popular free blogging platform. It's easy to set up, and easy to start blogging.
Start a blog at Blogger.com


MSN SpacesIf you have a Microsoft .Net Passport account, this may be the easiest way to go. MSN Spaces is easy to use and offers most of the features found elsewhere.
Start a blog on MSN Spaces


Yahoo 360Yahoo's take on free bloggig. Enables users to bring together all of their personal information and share it with their friends, family, and others.
Start a blog at Yahoo 360


AOL JournalsIf you already have an aol account or screen name, Aol Journals may be the easiest way for you to start a blog, and get started.
Start a blog at AOL Journals

How to Make a website




Have an innovative concept for a great new website. 
If you already know what the website will be about, skip this step. Do not to copy others' ideas. Create a website with an interesting topic in a field you know a lot about.



What would be your goal? Identify your market. 
What kinds of people would the website serve? Conduct market research to figure out more about your audience. What do they do? How old are they? What are their other interests? All of this information can help make a website much more.


Register your domain. If you’re on a budget, remember that there are strategies for buying a cheap domain name. Find a domain name that is easy to remember and spell. If you use domains ending with .com, you will end up with more traffic, but remember to get creative


hot
Design your website. 

Here you have a few different options.

  • Get a website-building program and do it yourself. While this might work for your dried bug page, if you are unsure of your design eye and ability, then it's probably not the best choice if you're trying to make a sharp, professional impression (especially if you're trying to get people to part with their money).

  • Learn a programming language (or two, or three) and build a website from scratch.

  • HTML is incredibly easy to learn, and if you are up to it, you will be able to tweak your web design any way you want, and you would not have to pay anybody else to update or change your site.

  • XHTML is the new web language set by W3C's standards. Almost identical to HTML, it follows a stricter set of rules for marking up information - what this means, for the most part, is minor changes to the way you write code.
  • CSS, which stands for "Cascading Style Sheets", gives more flexibility for styling the HTML.
  • A browser sided scripting language, such as JavaScript, allows you to make your page interactive.
  • A server sided scripting language (PHP, ASP with JavaScript or VB Script or Python) can be used to change the way web pages appear to different people and edit or create forums. They can also help store information about people who visit your site, like their username, settings, and even temporary "shopping carts" for commercial sites.
  • Wordpress is another great option for building website. Wordpress is a free application that can be installed on your web server and make updating and organizing content very easy.
  • AJAX (Asynchronous JavaScript and XML) is a technique of using a browser sided language and a server sided language to make the page get new information from the server without refreshing the page, often greatly reducing user wait time and vastly improving the user's experience but increasing bandwidth usage. Think of the possibilities: you could probably make a web based instant messaging service!
  • Hire a professional. This is the best option for more advanced sites, especially e-commerce sites.
  • Use a free static site generator to create your site structure, navigation, and CSS stylesheet for you, then download your files and put them on your own server. 


Choose a web-host and upload your website. Your web host may have an FTP feature, or you can download your own FTP program like FileZilla. If you hired a professional to design the website, he or she may take care of this for you. You should also note that there are ways to host your own website for free.

How to Register a domain name



Registering a domain name isn’t as daunting as it may sound; thanks to the Internet, registering a domain name takes only minutes. 
Select a tentative domain name. 
This name will go between the www. and the .com (or .net, or .org or whatever you choose).
It’s a good idea to come up with several possible names for a web site. Many nice names are already in use, and you should also remember that a hyphen can make the difference between availability and unavailability. For example, while www.MyWebSite.com might not be available, www.My-Web-Site.com could be up for grabs.
Don’t rule out a .org or .net or other suffix like .name, .mobi, .tv, .biz, .info, .tel or .pro. Anyone can purchase domain names with these suffixes, so if www.AwesomeClothingForYourDog.com is unavailable, try www.AwesomeClothingForYourDog.tel instead. It normally works, and isn't much of a extra hassle!

Go to a reputable domain registrar such as NetworkSolutions.com, Register.com, GoDaddy.com or other and see what domain names are available. 
Network Solutions maintains not only a list of what domain names people can still buy, they also offer alternative available domain names in case the one you want is taken.
  • Try out a few different domain names. Double-check the spelling of every word before committing to paying to register a domain name.

  • A domain name will identify your business or hobby for a long time, so look at the way it reads. For example, www.WeAreMu.com may just denote a fraternity, but it can also read “Wear Emu,” which may cause confusion or protests from animal activists.



Pay for the selected domain name. 
Network Solutions offers different levels of services.
Purchase only the services you need. Network Solutions offers packages that will help market a web site or even design it. These services, while helpful, aren't necessary. All anyone must spend is the cost of actually purchasing the domain name.

How to Write PHP Scripts


PHP is a server scripting language used to make web pages interactive. Think of what happens when you edit a page on this website, for example. When you submit your changes, they're sent to one of the wikiHow servers, where they're processed by PHP scripts, and a new version of the page is sent back to your browser. Behind this process are many, perhaps hundreds of PHP scripts, controlling how web pages change based on a variety of circumstances.


While creating the software that powers this wiki is a monumental task, the programming itself is actually very approachable, even if you've never had any training as a programmer. This article will teach you how to write a few very simple PHP scripts so that you can get a basic understanding of how PHP works.


Install the Apache Web Server.


Install the PHP Engine on Your Computer.

Echo
Open Notepad (File>>All Programs>>Accessories>>Notepad). You'll be using Notepad a lot.

Type this into Notepad:

<?php echo "Hello World!"; ?>


Save this file as "helloworld.php".



When saving files in Windows Notepad, wrap the filename in double quotations so that Notepad doesn't add .txt to the end of the filename. Notice in the image that the file helloworld.php has " " around it. You have to do this or Notepad will save the file as helloworld.php.txt


Or you can simply click the drop down for Save as type and change it to All Files (*.*) which will leave the name exactly how you type it and the quotes will not need to be added.







Open your favorite browser and type this address in the address bar:http://localhost/helloworld.php

  • If you receive an error message, make sure you typed in the code exactly as shown above, including the colon.

  • This is what you should see in your browser window:

Hello World!

Now it's time to understand how it works.

<?php ?>

These two lines tell the PHP engine that everything between them is PHP code. Everything outside the two tags is treated as HTML and ignored by the PHP engine and sent to your browser the same as any other HTML. The important thing you need to recognize here is that PHP scripts are embedded inside regular HTML pages.
echo "Hello World!";

This line uses the echo statement (well, actually it is a construct, but more on that later). Statements are used to tell the PHP engine to do something. In this case, you are telling the engine to print what is inside the quotes.
It's important to know that when we say print, we don't actually mean print. The PHP engine never actually prints anything to your screen. Any output generated by the engine is sent to your browser as HTML. Your browser doesn't even know that it's getting PHP output. As far as the browser is concerned, it's getting plain HTML.




PHP and HTML
Change the script above so that it looks like this:

<?php echo "<strong>Hello World!</strong>"; ?>


Save the file as "helloworld2.php", and open your browser by using the address:http://localhost/helloworld2.php

This time the output is the same as before, but this time the text is in bold.
<strong> and </strong> are HTML markup tags the tell the browser to show any text between them as bold. As stated earlier, a browser will treat anything that prints out of a PHP engine like HTML.

Let's write the same script as before, but add another echo statement. 

Type this into Notepad:
<?php echo "Hello World!<br />"; echo "How are you doing?"; ?>

Save this as "helloworlddouble.php"
When you run the script in your browser, you should see this:
Hello World!How are you doing?

The thing you need to notice is the <br /> on the first line. This is HTML markup to insert a line break. If you didn't add this, your output would look like this:

Hello World!How are you doing?

Now that you've mastered the echo statement, let's move on to something a bit more complicated.

Variables
Think of variables as containers for data. To manipulate data, be it numbers or names, you need to store the data in a container. The syntax for assigning data, or better called a value, into a variable is:


$myVariable = "Hello World!";

In the above example, the value is "Hello World!", and the variable is $myVariable. You're telling PHP to store the value at the right of the equal sign, into the variable at the left of the equal sign.

The dollar sign ($) at the beginning tells PHP that $myValue is a variable. All variables must start with the dollar sign.



Now let's do something fun with a variable. Open Notepad and type this in:


<?php $myVariable = "Hello World!"; echo $myVariable; ?>

Save the file as "myfirstvariable.php". When you browse to this script with your browser, the output should look like this:

Hello World!

Let's examine in how it works. On the first line of the script, you have defined a variable called $myVariable, and you have inserted a value; "Hello World!". On a line like this, you are giving the variable name on the left of the equal sign, and the value you want to assign to it on the right of the equal sign. From this point on in your script, unless you change the value, $myVariable will always contain the value "Hello World!".

The next line you should be familiar with, a simple echo statement. What you need to take notice of is that the echo statement printed the value of $myVariable, and not literally "$myVariable".

Variables can also contain numbers, and then those numbers can be manipulated using simple mathematical functions.
Take this next script, for example. Type this into notepad:


<?php $mySmallNumber = 12; $myLargeNumber = 356; $myTotal = $mySmallNumber + $myLargeNumber; echo $myTotal; ?>

Run this script in your browser, you should see this:

368

Nothing real impressive, but you did add two variables together. Let's review.

On the first two lines, you created two variables. $mySmallNumber, and $myLargeNumber. You have inserted into these variables two values, 12 and 356, respectively.

On the third line, you have created another variable called $myTotal. With this variable, you have stored the value of $mySmallNumber PLUS $myLargeNumber. Since $mySmallNumber has the value of 12 stored in it, and $myLargeNumber has the value of 356 stored in it, what you have done is stored the value of 12 + 356 into the $myTotal variable. The value stored in $myTotal is 368.

The last line is an echo statement which outputs the value of $myTotal.




tips

This article assumes you've installed Apache and PHP on your computer. Anytime it's said to save a file, you are saving in the\htdocs directory inside the Apache directory.
A really useful tool to help you test PHP files is XAMPP which is a free program that installs and runs Apache and PHP to help you simulate a server on your computer.