WordPress 2.7 Complete — Save 50%
Create your own complete blog or web site from scratch with WordPress
This article by April Hodge Silver, author of WordPress 3 Complete, will guide you through the process of setting up WordPress and customizing its basic features. You can choose between a couple of options regarding where your WordPress installation will live. Keep in mind that WordPress is relatively small (under 10 MB), easy to install, and easy to administer.
In this article, you will learn how to:
- Create a free blog on WordPress.com
- Install WordPress manually on your web host
|Read more about this book|
(For more resources on Wordpress, see here.)
WordPress is available in easily downloadable formats from its website, http://wordpress.org/download/. WordPress is a free, open source application, and is released under GNU General Public License (GPL). This means that anyone who produces a modified version of software released under the GPL is required to keep those same freedoms, that people buying or using the software may also modify and redistribute, attached to his or her modified version. This way, WordPress and other software released under GPL are kept open source.
Where to build your WordPress website
The first decision you have to make is where your blog is going to live. You have two basic options for the location where you will create your site. You can:
- Use WordPress.com
- Install on a server (hosted or your own)
Let's look at some of the advantages and disadvantages of each of these two choices.
The advantage of using WordPress.com is that they take care of all of the technical details for you. The software is already installed; they'll upgrade it for you whenever there's an upgrade; and you're not responsible for anything else. Just manage your content! The big disadvantage is that you lose almost all of the theme and plugin control you'd have otherwise. WordPress.com will not let you upload or edit your own theme, though it will let you (for a fee) edit the CSS of any theme you use. WordPress.com will not let you upload or manage plugins at all. Some plugins are installed by default (most notably Akismet, for spam blocking, and a fancy statistics plugin), but you can neither uninstall them nor install others. Additional features are available for a fee as well.
The following table is a brief overview of the essential differences between using WordPress.com versus installing WordPress on your own server:
|WordPress.com||Your own server|
|Installation||You don't have to install anything, just sign up||Install WordPress yourself, either manually or via your host's control panel (if offered)|
|Themes||Use any theme made available by WordPress.com||Use any theme available anywhere, written by anyone (including yourself)|
|Plugins||No ability to choose or add plugins||Use any plugin available anywhere, written by anyone (including yourself)|
|Upgrades||WordPress.com provides automatic upgrades||You have to upgrade it yourself when upgrades are available|
|Widgets||Widget availability depends on available themes||You can widgetize any theme yourself|
|Maintenance||You don't have to do any maintenance||You're responsible for the maintenance of your site|
|Advertising||No advertising allowed||Advertise anything|
WordPress.com (http://wordpress.com) is a free service provided by the WordPress developers, where you can register a blog or non-blog website easily and quickly with no hassle. However, because it is a hosted service, your control over some things will be more limited than it would be if you hosted your own WordPress website. As mentioned before, WordPress.com will not let you edit or upload your own themes or plugins. Aside from this, WordPress.com is a great place to maintain your personal site if you don't need to do anything fancy with a theme. To get started, go to http://wordpress.com, which will look something like the following:
To register your free website, click on the loud orange-and-white Sign up now button. You will be taken to the signup page. In the following screenshot, I've entered my username (what I'll sign in with) and a password (note that the password measurement tool will tell you if your password is strong or weak), as well as my e-mail address. Be sure to check the Legal flotsam box and leave the Gimme a blog! radio button checked. Without it, you won't get a website.
After providing this information and clicking on the Next button, WordPress will ask for other choices (Blog Domain, Blog Title, Language, and Privacy), as shown in following screenshot. You can also check if it's a private blog or not. Note that you cannot change the blog domain later! So be sure it's right.
After providing this information and clicking on Signup, you will be sent to a page where you can enter some basic profile information. This page will also tell you that your account is set up, but your e-mail ID needs to be verified. Be sure to check your inbox for the e-mail with the link, and click on it. Then, you'll be truly done with the installation.
Installing WordPress manually
The WordPress application files can be downloaded for free if you want to do a manual installation. If you've got a website host, this process is extremely easy and requires no previous programming skills or advanced blog user experience.
Some web hosts offer automatic installation through the host's online control panel. However, be a little wary of this because some hosts offer automatic installation, but they do it in a way that makes updating your WordPress difficult or awkward, or restricts your ability to have free rein with your installation in the future.
Preparing the environment
A good first step is to make sure you have an environment setup that is ready for WordPress. This means two things: making sure that you verify that the server meets the minimum requirements, and making sure that your database is ready.
For WordPress to work, your web host must provide you with a server that does the following two things:
- Support PHP, which must be at least Version 4.3.
- Provide you with write access to a MySQL database. MySQL has to be at least Version 4.1.2.
You can find out if your host meets these two requirements by contacting your web host. If your web server meets these two basic requirements, you're ready to move on to the next step.
As far as web servers go, Apache is the best. However, WordPress will also run on a server running the Microsoft IIS server (though using permalinks will be difficult, if possible at all).
Enabling mod_rewrite to use pretty permalinks
If you want to use permalinks, your server must be running Unix, and Apache's mod_rewrite option must be enabled. Apache's mod_rewrite is enabled by default in most web hosting accounts. If you are hosting your own account, you can enable mod_rewrite by modifying the Apache web server configuration file. You can check the URL http://www.tutorio.com/tutorial/enable-mod-rewrite-on-apache to learn how to enable mod_rewrite on your web server. If you are running on shared hosting, then ask your system administrator to install it for you. However, it is more likely that you already have it installed on your hosting account.
Once you have checked out your environment, you need to download WordPress from http://wordpress.org/download/. Take a look at the following screenshot in which the download links are available on the right side:
The .zip file is shown as a big blue button because that'll be the most useful format for the most people. If you are using Windows, Mac, or Linux operating systems, your computer will be able to unzip that downloaded file automatically. (The .tar.gz file is provided because some Unix users prefer it.)
A further note on location We're going to cover installing WordPress remotely. However, if you plan to develop themes or plugins, I suggest that you also install WordPress locally on your own computer's server. Testing and deploying themes and plugins directly to the remote server will be much more time-consuming than working locally. If you look at the screenshots I will be taking of my own WordPress installation, you'll notice that I'm working locally (for example, http://wpbook:8888/ is a local URL).
After you download the WordPress .zip file, extract the files, and you'll get a folder called wordpress. It will look like the following screenshot:
eBook Price: $23.99
Book Price: $39.99
|Read more about this book|
(For more resources on Wordpress, see here.)
Uploading the files
Now, we need to upload all these files to our web server using any FTP client (or simply put them in our local server directory on our local computer). FTP stands for File Transfer Protocol. There are several FTP clients available on the Internet, which are either freeware (no cost) or as shareware (a small fee). If you don't already have an FTP client, try one of these:
- Filezilla— http://filezilla-project.org/download.php?type=client (for Mac or Windows)
- Fetch— http://fetchsoftworks.com/ (for Mac only)
- SmartFTP— http://www.smartftp.com/ (for Windows only)
You can also use the popular web-based FTP application net2ftp at http://www.net2ftp.com. These services are useful if you don't want to install a desktop application on your computer. You can also check if your host provides browser-based FTP software.
In my screenshots you'll see that I'm using Transmit, which is the professional FTP software I use on my Mac. It works the same way as the examples above.
A note about security: whenever possible, you should use Secure FTP (called sFTP) rather than regular FTP. If you're using sFTP, all of the data sent and received are encrypted, whereas with FTP, data are sent in plain text and can be easily nabbed by hackers. Check both your FTP software and your hosting options, and select sFTP if it's available.
Using your FTP client or service, connect to your FTP server using the server address, username, and password provided to you by your host. Next, open the folder where you want WordPress to live. You may want to install WordPress in your root folder, which will mean that visitors will see your WordPress website's home page when they go to your main URL—for example, http://yoursite.com. Alternatively, you may want to install WordPress in a subfolder; for example: http://yoursite.com/blog/.
On the left side, you will see the files from your local folder, and on the right side you will see your remote folder. (Note: the FTP client you are using may have a slightly different layout, but this is the general idea):
(Move the mouse over the image to enlarge.)
Now select all of the WordPress files on your local machine from the left pane, and drag all of them to the right pane. You can watch as your FTP client uploads the files one at a time and they appear in the right panel. This could take a few minutes, so be patient!
If you're installing WordPress on your local server, just be sure to place the WordPress files in the correct webroot directory on your computer.
Once all of the files are done uploading, you're ready to do the installation.
Now it's time to install WordPress. For example, I will be working on my local server and just put brand-new WordPress files at http://wpbook:8888/. So, this is going to be the URL of my WordPress website. If you access your WordPress URL via your browser, it will look like the following:
It says that you need to create a file named wp-config.php before proceeding further. WordPress (and I) recommend that you do this manually, rather than using the Create a Configuration File link. If you do choose to use the config creator, you'll need the information below as well (though there will be no opportunity for the security phrases).
Open the wordpress folder and find the file named wp-config-sample.php. Make a copy of this file and name it wp-config.php. We'll modify this file together. Don't worry; you need not be a PHP programmer. Just open this file with a simple editor such as Notepad. The following is the copied text from the original wp-config.php file. Note that I've removed most of the comments, so that we can focus on the items we need to change.
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
/** Database Charset to use in creating database tables. */
/** The Database Collate type. Don't change this if in doubt. */
define('AUTH_KEY', 'put your unique phrase here');
define('SECURE_AUTH_KEY', 'put your unique phrase here');
define('LOGGED_IN_KEY', 'put your unique phrase here');
define('NONCE_KEY', 'put your unique phrase here');
define('AUTH_SALT', 'put your unique phrase here');
define('SECURE_AUTH_SALT', 'put your unique phrase here');
define('LOGGED_IN_SALT', 'put your unique phrase here');
define('NONCE_SALT', 'put your unique phrase here');
$table_prefix = 'wp_';
One thing to know about PHP is that any text that comes after a double slash (//), or between a slash-star and star-slash (/* */), is a comment. It's not actual PHP code. Its purpose is to inform you what that line or that section is about.
As you can see from the previous code, there are a number of settings that you can insert here. Let's walk through the most important ones.
As I mentioned in an earlier section, you need to have write access to a database. Most large web hosts offer you a way to create your own databases, with usernames and passwords, via an online control panel. If you're not sure how to do this, just e-mail or call your hosting provider for this information. You'll need four pieces of information about your database for the WordPress configuration file. They are:
- Database server—for example, localhost
- Username—for example, localdbuser
- Password—for example, 62dcx0hnm
- Database name—for example, wpbookdb
Your database server might not be localhost. If it's not, you can ask your hosting provider, or take a look at this handy cheat sheet: http://codex.wordpress.org/Editing_wp-config.php#Possible_DB_HOST_values.
Once you have those four things, you can fill them into your wp-config.php file. For example, see how mine is filled out here:
// ** MySQL settings ** //
Next, for security purposes, you really should put some unique phrases into the unique keys. The secret keys are used by WordPress to add random elements to your passwords and are also used in some other situations. This will help to keep your WordPress installation uniquely protected. No one else is likely to choose the same unique keys that you chose, and therefore, breaking or hacking into your site will be more difficult. You can get some secret keys generated by going to https://api.wordpress.org/secret-key/1.1/salt/. Once I did that, I got the following, which I can paste directly over the default code in wp-config.php:
define('LOGGED_IN_KEY', 'sryMVd`jVpiMWWQqx~!v XE5@fJMTt2[Z');
The only other thing you may want to consider is the table prefix. I strongly recommend using a prefix. If you want to install WordPress more than once, you'll need to use different prefixes in your different installations. If you are using this same database for other things, it'll be handy if the tables are grouped based on what they're being used for. So either leave the following line as it is, or choose another prefix:
$table_prefix = 'wpbook_';
Learning more: The WordPress codex has a long and detailed page that describes everything about editing your wp-config.php file: http://codex.wordpress.org/Editing_wp-config.php.
Now, go back to your browser and reload the page that's pointing to your WordPress installation. If your configuration file makes sense to WordPress, you'll be taken directly to the installation page.
(If you've ever installed an earlier version of WordPress, you'll notice some differences, like the ability to choose your first username and password!) Now, fill out the installation form (you will be able to change all of these later, so don't be too worried about getting locked into your choices):
- Site title: Fill in the name of your blog (in my case it's 'Daily Cooking').
- Username: Note that the default username is 'admin', but for security purposes, you're better off picking another username. If someone ever tries to hack your blog, they will be halfway there if they already know your username. I've chosen 'ahsilver'.
- Password: Choose a secure password, one that has both upper and lowercase letters, a number or two, and even a few punctuation marks.
- Your E-Mail: Double-check that this is correct, because this is the e-mail address WordPress will use to contact you about the blog, comments, and so on. If you do not get an e-mail from your WordPress site shortly after installing, check your spam folder.
Now, click on Install WordPress. You're done with the install!
You can click on Log In to get to the login page. Or you can always enter your WordPress Admin panel (also known as the WP Admin) by pointing your browser to http://yoursite.com/wp-admin. If you're not already logged in, this URL will redirect you to the login page.
If you'd like to see an even more detailed step-by-step guide for manual installation, take a look at this page in the WordPress Codex: http://codex.wordpress.org/Installing_WordPress.
Also, you can find more detailed installation instructions—as well as specifics on changing file permissions, using FTP, using languages, importing from other blogging engines, and more—in the WordPress Codex here: http://codex.wordpress.org/Getting_Started_with_WordPress#Installation.
In this article we took a look at how to create a blog on WordPress.com and install WordPress on a remote server.
- WordPress 3 Complete [Book]
- WordPress 2.9 E-Commerce [Book]
- How to Write a Widget in WordPress 3 [Article]
- How to Create an Image Gallery in Wordpress 3 [Article]
- Performing Setup Tasks in the WordPress Admin Panel [Article]
- Tips and Tricks for Working with jQuery and WordPress [Article]
eBook Price: $23.99
Book Price: $39.99
About the Author :
April has been designing and developing new web sites from scratch since 1999, just before her graduation from Columbia University. Early in her career, she worked for several web companies and startups, including DoubleClick and About.com. Since 2004, she has been self-employed through her company Springthistle Design and has worked with a staggering variety of companies, non-profits, and individuals to realize their web site dreams. In her professional work, April's focus is always on usability, efficiency, flexibility, clean design, and client happiness. WordPress is the best solution for many of Springthistle's Clients, though April also develops custom web applications using PHP and MySQL. More about April's professional work at http://springthistle.com
In her free time, April enjoys developing recipes in the kitchen, bicycling, and relaxing with her daughter, dog, and darlin wife.