Chapter 3

Setting Up Blogging Base Camp

In This Chapter

arrow Finding and buying a domain name

arrow Finding web hosting

arrow Brushing up on FTP

arrow Installing WordPress

Before you can start using WordPress, you have to set up your base camp. Doing so involves more than simply downloading and installing the WordPress software. You also need to establish your domain (your website address) and your web-hosting service (the place that houses your website). Although you initially download your WordPress software onto your hard drive, your web host is where you install it.

Obtaining a web server and installing software on it are much more involved projects than simply obtaining an account with the hosted version of WordPress that’s available at WordPress.com (covered in Chapter 1). You need to consider many factors in this undertaking, as well as cope with a learning curve, because setting up your website through a hosting service involves using some technologies that you may not feel comfortable with at first.

This chapter takes you through the basics of those technologies, and by the last page of this chapter, you’ll have WordPress successfully installed on a web server with your own domain name.

Establishing Your Domain

You’ve read all the hype. You’ve heard all the rumors. You’ve seen the flashy websites on the web powered by WordPress. But where do you start?

The first steps toward installing and setting up a WordPress website are deciding on a domain name and then purchasing the registration of that name through a domain registrar. A domain name is the unique web address that you type in a web browser’s address bar to visit a website. Some examples of domain names are WordPress.org and Google.com.

tip I emphasize the word “unique” because no two domain names can be the same. If someone else has registered the domain name you want, you can’t have it. With that in mind, it sometimes takes a bit of time to find a domain that isn’t already in use and is available for you to use.

Understanding domain name extensions

When registering a domain name, be aware of the extension that you want. The .com, .net, .org, .info, .me, .us, or .biz extension that you see tacked onto the end of any domain name is the top-level domain extension. When you register your domain name, you’re asked to choose the extension you want for your domain (as long as it’s available, that is).

A word to the wise here: Just because you have registered your domain as a .com doesn’t mean that someone else doesn’t, or can’t, own the very same domain name with a .net. So if you register MyDogHasFleas.com, and it becomes a hugely popular site among readers with dogs that have fleas, someone else can come along and register MyDogHasFleas.net and run a similar site to yours in the hope of riding the coattails of your website’s popularity and readership.

You can register your domain name with all available extensions if you want to avert this problem. My own website, for example, has the domain name lisasabin-wilson.com; however, I also own lisasabin-wilson.net.

Considering the cost of a domain name

Registering a domain costs you anywhere from $3 to $30/year depending on what service you use for a registrar and what options (such as privacy options and search-engine submission services) you apply to your domain name during the registration process.

remember When you pay the domain registration fee today, you need to pay another registration fee when the renewal date comes up again in a year, or two, or five — however many years you chose to register your domain name for. (See the previous “Domain names: Do you own or rent?” sidebar.) Most registrars give you the option of signing up for a service called Auto Renew to automatically renew your domain name and bill the charges to the credit card you set up on that account. The registrar sends you a reminder a few months in advance, telling you it’s time to renew. If you don’t have Auto Renew set up, you need to log in to your registrar account before it expires and manually renew your domain name.

Registering your domain name

Domain registrars are certified and approved by the Internet Corporation for Assigned Names and Numbers (ICANN). Although hundreds of domain registrars exist today, those in the following list are popular because of their longevity in the industry, competitive pricing, and variety of services they offer in addition to domain name registration (such as web hosting and website traffic builders):

No matter where you choose to register your domain name, here are the steps you can take to accomplish this task:

  1. Decide on a domain name.

    Doing a little planning and forethought here is necessary. Many people think of a domain name as a brand — a way of identifying their websites or blogs. Think of potential names for your site, then you can proceed with your plan.

  2. Verify the domain name’s availability.

    In your web browser, enter the URL of the domain registrar of your choice. Look for the section on the registrar’s website that lets you enter the domain name (typically, a short text field) to see whether it’s available. If the domain name isn’t available as a .com, try .net or .info.

  3. Purchase the domain name.

    Follow the domain registrar’s steps to purchase the name using your credit card. After you complete the checkout process you’ll receive an email confirming your purchase, so use a valid email address during the registration process.

The next step is obtaining a hosting account, which I cover in the next section.

remember Some of the domain registrars have hosting services that you can sign up for, but you don’t have to use those services. Often you can find hosting services for a lower cost than most domain registrars offer. It just takes a little research.

Finding a Home for Your Website

When you have registered your domain, you need to find a place for it to live: a web host. Web hosting is the second piece of the puzzle that you need before you begin working with the WordPress software.

A web host is a business, group, or individual that provides web server space and bandwidth for file transfer to website owners who don’t have it. Usually, web-hosting services charge a monthly or annual fee — unless you’re fortunate enough to know someone who’s willing to give you server space and bandwidth for free. The cost varies from host to host, but you can obtain web-hosting services starting at $5 to $20/month or more, depending on your individual needs.

Most web hosts consider WordPress to be a third-party application. What this means to you is that the host typically won’t provide technical support on the use of WordPress (or any other software application) because support isn’t included in your hosting package. To find out whether your chosen host supports WordPress, always ask first. As a WordPress user, you can find WordPress support in the official forums at https://wordpress.org/support.

tip Several web-hosting providers also have WordPress-related services available for additional fees. These services can include technical support, plugin installation and configuration, and theme design services.

Web-hosting providers generally provide (at least) these services with your account:

  • Hard drive space
  • Bandwidth (transfer)
  • Domain email with web mail access
  • File Transfer Protocol (FTP) access
  • Comprehensive website statistics
  • MySQL database(s)
  • PHP

Because you intend to run WordPress on your web server, you need to look for a host that provides the minimum requirements needed to run the software on your hosting account, which are

  • PHP version 5.2.4 (or greater)
  • MySQL version 5.0 (or greater)

tip The easiest way to find out whether a host meets the minimum requirements for running the WordPress software is to check the FAQ (Frequently Asked Questions) section of the host’s website, if it has one. If not, find the contact information for the hosting company and fire off an email requesting information on exactly what it supports.

Getting help with hosting WordPress

The popularity of WordPress has given birth to services on the web that emphasize the use of the software. These services include WordPress designers, WordPress consultants, and — yes — web hosts that specialize in using WordPress.

Many of these hosts offer a full array of WordPress features, such as an automatic WordPress installation included with your account, a library of WordPress themes, and a staff of support technicians who are very experienced in using WordPress.

Here is a list of some of those providers:

warning A few web-hosting providers offer free domain name registration when you sign up for hosting services. Research this topic and read their terms of service, because that free domain name may come with conditions. Many of my clients have gone this route only to find out a few months later that the web-hosting provider has full control of the domain name, and they aren’t allowed to move that domain off the host’s servers either for a set period (usually a year or two) or for eternity. It’s always best to have the control in your hands, not someone else’s, so try to stick with an independent domain registrar, such as Network Solutions.

Dealing with disk space and bandwidth

Web-hosting services provide two very important things with your account:

  • Disk space
  • Bandwidth transfer

Think of your web host as a garage that you pay to park your car in. The garage gives you the place to store your car (disk space). It even gives you the driveway so that you, and others, can get to and from your car (bandwidth). It won’t, however, fix your rockin’ stereo system (WordPress or any other third-party software application) that you’ve installed — unless you’re willing to pay a few extra bucks for that service.

Managing disk space

Disk space is nothing more complicated than the hard drive on your computer. Each hard drive has the capacity, or space, for a certain number of files. An 80GB (gigabyte) hard drive can hold 80GB of data — no more. Your hosting account provides you a limited amount of disk space, and the same concept applies. If your web host provides you 80GB of disk space, that’s the limit on the file size that you’re allowed to have. If you want more disk space, you need to upgrade your space limitations. Most web hosts have a mechanism in place for you to upgrade your allotment.

Starting out with a small WordPress blog doesn’t take much disk space at all. A good starting point for disk space is between 10 and 20GB of storage space. If you need additional space, contact your hosting provider for an upgrade.

remember The larger your website, the more space you will need. Also, the more visitors and traffic your website has, the more bandwidth you will require (see the next section).

Choosing the size of your bandwidth “pipe”

Bandwidth refers to the amount of data that is carried from point A to point B within a specific period (usually, only a second or two). I live out in the country — pretty much the middle of nowhere. I get my water from a private well that lies buried in the backyard somewhere. Between my house and the well are pipes that bring the water into my house. The pipes provide a free flow of water to our home so that everyone can enjoy their long, hot showers while I labor over dishes and laundry, all at the same time. Lucky me!

The very same concept applies to the bandwidth available with your hosting account. Every web-hosting provider offers a variety of bandwidth limits on the accounts it offers. When I want to view your website in my browser window, the bandwidth is essentially the “pipe” that lets your data flow from your “well” to my computer and appear on my monitor. The bandwidth limit is kind of like the pipe connected to my well: It can hold only a certain amount of water before it reaches maximum capacity and won’t bring the water from the well any longer. Your bandwidth pipe size is determined by how much bandwidth your web host allows for your account — the larger the number, the bigger the pipe. A 50MB bandwidth limit makes for a smaller pipe than does a 100MB limit.

Web hosts are pretty generous with the amount of bandwidth they provide in their packages. Like disk space, bandwidth is measured in gigabytes (GB). Bandwidth provision of 10 to 50GB is generally a respectable amount to run a website with a blog.

remember Websites that run large files — such as video, audio, or photo files — generally benefit from more disk space (compared with sites that don’t have large files). Keep this point in mind when you’re signing up for your hosting account: If your site requires big files, you need more space. Planning now will save you a few headaches down the road.

Understanding FTP Concepts

The ability to use File Transfer Protocol (FTP) with your hosting account is a given for almost every web host on the market today. FTP offers two ways of moving files from one place to another:

  • Uploading: Transferring files from your local computer to your web server
  • Downloading: Transferring files from your web server to your local computer

You can do several other things with FTP, including the following, which I discuss later in this chapter:

  • View files: After you log in via FTP, you can see all the files that are located on your web server.
  • View date modified: You can see the date a file was last modified, which can sometimes be helpful when trying to troubleshoot problems.
  • View file size: You can see the size of each file on your web server, which is helpful if you need to manage the disk space on your account.
  • Edit files: Almost all FTP clients allow you to open and edit files through the client interface, which is a convenient way to get the job done.
  • Change permissions: Commonly referred to as CHMOD, an acronym for Change Mode, it controls what type of read/write/execute permissions the files on your web server have.

FTP is a convenient utility that gives you access to the files located on your web server, which makes managing your WordPress website a bit easier.

tip SFTP (Secret File Transfer Protocol) is also a method of FTP. SFTP provides an additional layer of security because it uses SSH (Secure Shell) and encrypts sensitive information, data, and passwords from being clearly transferred within the hosting network. Encrypting the data ensures that anyone monitoring the network is not able to read the data freely — and therefore, cannot obtain information that should be secured, such as passwords and usernames. I highly recommend using SFTP over FTP if it is available from your hosting provider.

Setting up FTP on your hosting account

Many web hosts today offer FTP as part of their hosting packages, so just confirm that your hosting provider makes FTP available to you for your account. cPanel is by far the most popular hosting account management software used by hosts on the web, eclipsing other popular tools such as Plesk and NetAdmin. It is within the hosting account management interface that you can set up the FTP account for your website.

tip In this chapter, I use cPanel as the example. If your hosting provider gives you a different interface to work with, the concepts are still the same, but you’ll need to refer to your hosting provider for the specifics to adapt these directions to your specific environment.

Mostly, the FTP for your hosting account is set up automatically. Figure 3-1 shows you the FTP Accounts page in cPanel. Follow these steps to get to this page and set up your FTP account:

  1. Log in to cPanel for your hosting account.

    Typically, you’ll browse to http://yourdomain.com/cpanel to bring up the login screen for your cPanel. Enter your specific hosting account username and password in the login fields and then click OK.

  2. Browse to the FTP Accounts page.

    Click the FTP Accounts link or icon in your cPanel to open the FTP Accounts page shown in Figure 3-1.

  3. View the existing FTP account.

    If your hosting provider automatically sets you up with an FTP account, you will see it listed in the Account Management section. Ninety-nine percent of the time, the default FTP account uses the same username and password combination as your hosting account or the login information you used to log in to your cPanel in Step 1.

image

Figure 3-1: The FTP Accounts page within cPanel.

If the FTP Accounts page doesn’t display a default FTP user in the Account Management section, you can easily create one in the Add FTP Account section:

  1. Type your desired username in the Login field.

    This creates the username of username@yourdomain.com (where username is the desired username you typed and yourdomain.com is your specific domain name).

  2. Type your desired password in the Password field.

    You can choose to type in your own password or click the Password Generator button to have the server generate a secure password for you. Retype the password in the Password (Again) field to validate it.

  3. Check the Strength indicator.

    The server tells you if your password is Very Weak, Weak, Good, Strong, or Very Strong. (Refer to Figure 3-1.) You want to have a very strong password for your FTP account that’s difficult for hackers and malicious Internet users to guess and crack.

  4. (Optional) Type the directory access for this FTP user.

    cPanel will fill this in for you and it will look something like this: public_html/user (the user, in this case, is the same username you entered in Step 1). Leaving this field as is gives this new FTP user access to only a folder with their username. For the purposes of installing WordPress, you want this account to have access to the public_html folder, so remove the /user portion of the directory access so that the field contains only public_html.

  5. Indicate the space limitations in the Quota field.

    Because you’re the site owner, leave the radio button selection set to Unlimited. (In the future, if you add a new FTP user, you can limit the amount of space, in megabytes [MB], by selecting the radio button to the left of the text field and typing the numeric amount in the text box; for example, 50MB.)

  6. Click the Create FTP Account button.

    A new screen appears with a message that the account was created successfully. Additionally, the settings for this new FTP account appear, which you should copy and paste into a blank text editor window (such as Notepad for PC or TextEdit for Mac users). The settings for the FTP account are the connection details you need to connect to your web server via FTP.

  7. Save the following settings:

    FTP Username, Password, and FTP Server are specific to your domain and the information you entered in the preceding steps.

    • FTP Username: username@yourdomain.com
    • Password: yourpassword
    • FTP Server: ftp.yourdomain.com
    • FTP Server Port: 21
    • Quota: Unlimited MB

tip Typically, the FTP Server Port will be 21. Be sure to double-check your FTP settings to make sure that this is the case. However, if you are setting up an SFTP account instead (Secure FTP), the port will need to be set to 22. Check with your hosting provider for specific port number assignment.

Connecting to the web server via FTP

For the purposes of this chapter, I use the FileZilla FTP client (http://sourceforge.net/projects/filezilla) because it’s very easy to use, and the cost is free ninety-nine (that’s open source geek-speak for free!).

Figure 3-2 shows a FileZilla client that’s not connected to a server. By default, the left side of the window displays a directory of files and folders on the local computer.

image

Figure 3-2: Mozilla FileZilla FTP client software.

The right side of the window displays content when the FileZilla client is connected to a web server; specifically, it shows directories of the web server’s folders and files.

remember If you use a different FTP client software than FileZilla, the steps and look of the software will differ, and you will need to adapt your steps and practice for the specific FTP client software you’re using.

Connecting to a web server is an easy process. Remember the FTP settings you saved from Step 7 in the previous section? As a reminder, here they are again:

  • FTP Username: username@yourdomain.com
  • Password: yourpassword
  • FTP Server: ftp.yourdomain.com
  • FTP Server Port: 21
  • Quota: Unlimited MB

This is where you need that information. To connect to your web server via the FileZilla FTP client, follow these few steps:

  1. Open the FTP client software on your local computer.

    Locate the program on your computer and click (or double-click) the program icon to launch the program.

  2. Choose File ⇒ Site Manager to open the Site Manager utility.

    The Site Manager utility appears, as shown in Figure 3-3.

  3. Click the New Site button.
  4. Type a name for your site that helps you identify the site.

    This site name can be anything you want it to be because it isn’t part of the connection data you add in the next steps. (In Figure 3-4, you see My Site — original, I know.)

  5. Enter the FTP server in the Host field.

    Host is the same as the FTP server information provided to you when you set up the FTP account on your web server. In the example, the FTP server is ftp.yourdomain.com, so that’s entered in the Host field, as shown in Figure 3-4.

  6. Enter the FTP port in the Port field.

    Typically, in most hosting environments, FTP uses port 21, and this never changes. However, double-check your port number and enter it in the Port field, as shown in Figure 3-4.

  7. Select the server type.

    FileZilla asks you to select a server type (as do most FTP clients). Choose FTP - File Transfer Protocol from the Protocol drop-down menu, as shown in Figure 3-4.

  8. Select the encryption type.

    By default, Filezilla has this set to Use plain FTP. You can leave this as is, unless your hosting provider has instructed you to use a different setting here.

  9. Select the logon type.

    FileZilla gives you several different logon types to choose from (as do most FTP clients). Choose Normal from the Logon Type drop-down menu.

  10. Enter your username in the User field.

    This is the username given to you in the FTP settings. In the example, the username is User.

  11. Type your password in the Password field.

    This is the password given to you in the FTP settings.

  12. Click the Connect button.

    This step connects your computer to your web server. The directory of folders and files from your local computer display on the left side of the FileZilla FTP client window, and the directory of folders and files on your web server display on the right side, as shown in Figure 3-5.

image

Figure 3-3: The Site Manager utility in the FileZilla FTP client software.

image

Figure 3-4: The FileZilla Site Manager utility with FTP account information filled in.

image

Figure 3-5: FileZilla displays local files on the left and server files on the right.

Now you can take advantage of all the tools and features FTP has to offer you!

Transferring files from point A to point B

Now that your local computer is connected to your web server, transferring files between the two couldn’t be easier. Within the FTP client software, you can browse the directories and folders on your local computer on the left side and browse the directories and folders on your web server on the right side.

FTP clients make it easy to transfer files from your computer to your hosting account by using a drag-and-drop method.

Two methods of transferring files are

  • Uploading: Generally, transferring files from your local computer to your web server. To upload a file from your computer to your web server, click the file you want to transfer from your local computer and drag and drop it onto the right side (the web server side).
  • Downloading: Transferring files from your web server to your local computer. To download a file from your web server to your local computer, click the file you want to transfer from your web server and drag and drop it onto the left side (the local computer side).

tip Downloading files from your web server is an efficient, easy, and smart way of backing up files to your local computer. It’s always a good idea to keep your files safe, especially things like theme files and plugins, which are covered in Part IV of this book.

Editing files using FTP

You will run into situations where you need to edit certain files that live on your web server. You can use the methods described in the preceding section to download a file, open it, edit it, save it, and then upload it to your web server. That is one way to do it. Another way is to use the built-in edit feature that exists in most FTP client software, by following these steps:

  1. Connect the FTP client to your web server.
  2. Locate the file you want to edit.
  3. Open the file using the internal FTP editor.

    Right-click the file and choose View/Edit. (Remember I’m using FileZilla; your FTP client may use different labels, such as Open or Edit.) FileZilla, like most FTP clients, uses a program (such as Notepad for a PC or TextEdit for Mac) designated for text editing that already exists on your computer. In some rare cases, your FTP client software may have its own internal text editor.

  4. Edit the file to your liking.
  5. Save the changes you made to the file.

    Click the Save icon or choose File ⇒ Save.

  6. Upload the file to your web server.

    After you save the file, FileZilla alerts you that the file has changed and asks whether you want to upload the file to the server. Click Yes; the newly edited file replaces the old one.

That’s all there is to it. Use the FTP edit feature to edit, save, and upload files as needed.

warning When you edit files using the FTP edit feature, you’re editing files in a “live” environment, meaning that when you save the changes and upload the file, the changes take effect immediately and affect your live website. For this reason, I strongly recommend downloading a copy of the original file to your local computer before making changes. That way, if you happen to make a typo on the saved file and your website goes haywire, you have a copy of the original file to upload to restore it to its original state.

Changing file permissions

Every file and folder on your web server has a set of assigned attributes, called permissions, that tells the web server three things about the folder or file. On a very simplistic level, these permissions include:

  • Read: This setting determines whether the file/folder is readable by the web server.
  • Write: This setting determines whether the file/folder is writable by the web server.
  • Execute: This setting determines whether the file/folder is executable by the web server.

Each set of permissions has a numeric code assigned to it, identifying what type of permissions are assigned to that file or folder. There are a lot of them, so here are the most common ones that you run into when running a WordPress website:

  • 644: Files with permissions set to 644 are readable by everyone and writable only by the file/folder owner.
  • 755: Files with permissions set to 755 are readable and executable by everyone, but they’re writable only by the file/folder owner.
  • 777: Files with permissions set to 777 are readable, writable, and can be executed by anyone. For security reasons, you should not use this set of permissions on your web server unless absolutely necessary.

Typically, folders and files within your web server are assigned permissions of either 644 or 755. Usually, you’ll see PHP files, or files that end with the .php extension, with permissions set to 644 if the web server is configured to use PHP Safe Mode.

tip This is a very basic look at file permissions because, usually, you will not need to mess with file permissions on your web server. In case you do need to dig further, you can find a great reference on file permissions from Elated.com at www.elated.com/articles/understanding-permissions.

You may run across a situation where you’re asked to edit and change the file permissions on a particular file on your web server. With WordPress sites, this usually happens when dealing with plugins or theme files that require files or folders to be writable by the web server. This practice is referred to as CHMOD, an acronym for Change Mode. When someone says, “You need to CHMOD that file to 755,” you’ll know what he is talking about.

Here are some easy steps for using your FTP program to CHMOD a file, or edit its permissions on your web server:

  1. Connect the FTP client to your web server.
  2. Locate the file you want to CHMOD.
  3. Open the file attributes for the file.

    Right-click the file on your web server and choose File Permissions. (If your client is not FileZilla, it may use different terminology.)

    The Change File Attributes window appears, as shown in Figure 3-6.

  4. Type the correct file permissions number in the Numeric Value field.

    This is the number assigned to the permissions you want to give the file. Most often, the plugin or theme developer tells you which permissions number to assign to the file or folder; typically, it will be either 644 or 755. (The permissions in Figure 3-6 are assigned the value of 644.)

  5. Click OK to save the file.
image

Figure 3-6: The Change File Attributes window.

Installing WordPress

By the time you’re finally ready to install WordPress, you should have done the following things:

  • Purchased the domain name registration for your account
  • Obtained a hosting service on a web server for your blog
  • Established your hosting account’s username, password, and FTP address
  • Acquired an FTP client for transferring files to your hosting account

If you missed doing any of these items, you can go back to the beginning of this chapter to read the portions you need.

tip Some hosting providers have their own WordPress installers that can make installing WordPress an easier process by providing things like a step-by-step wizard or an easy interface to make it happen. Check with your hosting provider to see if they provide a WordPress installer for you to use.

Installing WordPress manually

If you have to install WordPress manually, here’s where the rubber meets the road — that is, you’re putting WordPress’s famous five-minute installation to the test. Set your watch and see whether you can meet that five-minute mark.

remember The famous five-minute installation includes the time it takes to install the software only. It doesn’t include the time to

  • Register a domain name.
  • Obtain and set up your web-hosting service.
  • Download, install, configure, and learn how to use the FTP software.

Without further ado, go get the latest version of the WordPress software at https://wordpress.org/download.

tip WordPress gives you two compression formats for the software: zip and tar.gz. I recommend getting the .zip file because it’s the most common format for compressed files.

Download the WordPress software to your computer and decompress (unpack or unzip) it to a folder on your computer’s hard drive. These steps are the first in the installation process for WordPress. Having the program on your own computer isn’t enough, however; you also need to upload (transfer) it to your web server account (the one you obtained in “Finding a Home for Your Website,” earlier in this chapter).

Before installing WordPress on your web server, make sure that you have a MySQL database set up and ready to accept the WordPress installation. The next section tells you what you need to know about MySQL.

Setting up the MySQL database

The WordPress software is a personal publishing system that uses a PHP-and-MySQL platform, which provides everything you need to create your own website and publish your own content dynamically without having to know how to program those pages yourself. In short, all your content (options, posts, comments, and other pertinent data) is stored in a MySQL database in your hosting account.

Every time visitors go to your blog to read your content, they make a request that’s sent to your server. The PHP programming language receives that request, obtains the requested information from the MySQL database, and then presents the requested information to your visitors through their web browsers.

Every web host is different in how it gives you access to set up and manage your MySQL database(s) for your account. In this section, I use cPanel, a popular hosting interface. If your host provides a different interface, the same basic steps apply; just the setup in the interface that your web host provides may be different.

To set up the MySQL database for your WordPress website with cPanel, follow these steps:

  1. Log in to the administration interface with the username and password assigned to you by your web host.

    I’m using the cPanel administration interface, but your host may provide NetAdmin or Plesk, for example.

  2. Locate the MySQL Database Administration section.

    In cPanel, click the MySQL Databases icon.

  3. Choose a name for your database and enter it in the Name text box.

    Note the database name because you’ll need it during the installation of WordPress later.

    tip For security reasons, make sure that your password isn’t something that sneaky hackers can easily guess. Usually, I give my database a name that I will easily recognize later. This practice is especially helpful if you’re running more than one MySQL database in your account. If I name this database something like WordPress or wpblog, I can be reasonably certain — a year from now, when I want to access my database to make some configuration changes — that I know exactly which one I need to deal with.

  4. Click the Create Database button.

    You get a message confirming that the database has been created.

  5. Click the Go Back link or the Back button on your browser toolbar.
  6. Choose a username and password for your database, enter them in the Add New User text boxes, and then click the Create User button.

    You get a confirmation message that the username was created with the password you specified.

    warning Make absolutely sure that you note the database name, username, and password that you set up during this process. You will need them in the next section before officially installing WordPress on your web server. Jot them down on a piece of paper, or copy and paste them into a text-editor window; either way, just make sure that you have them immediately handy.

  7. Click the Go Back link or the Back button on your browser toolbar.
  8. In the Add Users to Database section, choose the user account you just set up from the User drop-down menu; then choose the new database from the Database drop-down menu.

    The MySQL Account Maintenance, Manage User Privileges page appears in cPanel.

  9. Assign user privileges by selecting the All Privileges check box.

    Because you’re the administrator (owner) of this database, you need to assign all privileges to the new user account you just created.

  10. Click the Make Changes button.

    A page opens with a confirmation message that you’ve added your selected user to the selected database.

  11. Click the Go Back link.

    You go back to the MySQL Databases page.

Uploading the WordPress files

To upload the WordPress files to your host, return to the folder on your computer where you unpacked the WordPress software that you downloaded earlier. You’ll find all the files you need (shown in Figure 3-7) in a folder called /wordpress.

image

Figure 3-7: WordPress software files to be uploaded to your web server.

Using your FTP client, connect to your web server and upload all these files to your hosting account into the root directory.

tip If you don’t know what your root directory is, contact your hosting provider and ask, “What is my root directory for my account?” Every hosting provider’s setup is different. On my web server, my root directory is the public_html folder; some of my clients have a root directory in a folder called httpdocs. The answer really depends on what type of setup your hosting provider has. When in doubt, ask!

Here are a few things to keep in mind when you’re uploading your files:

  • Upload the contents of the /wordpress folder to your web server — not the folder itself. Most FTP client software lets you select all the files and drag and drop them to your web server. Other programs have you highlight the files and click a Transfer button.
  • Choose the correct transfer mode. File transfers via FTP have two different forms: ASCII and binary. Most FTP clients are configured to autodetect the transfer mode. Understanding the difference as it pertains to this WordPress installation is important so that you can troubleshoot any problems you have later:

    • Binary transfer mode is how images (such as .jpg, .gif, .bmp, and .png files) are transferred via FTP.
    • ASCII transfer mode is for everything else (text files, PHP files, JavaScript, and so on).

    For the most part, it’s a safe bet to make sure that the transfer mode of your FTP client is set to autodetect. But if you experience issues with how those files load on your site, retransfer the files using the appropriate transfer mode.

  • You can choose a different folder from the root. You aren’t required to transfer the files to the root directory of your web server. You can make the choice to run WordPress on a subdomain, or in a different folder, on your account. If you want your blog address to be http://yourdomain.com/blog, you transfer the WordPress files into a folder named /blog.
  • Choose the right file permissions. File permissions tell the web server how these files can be handled on your server — whether they’re files that can be written to. As a general rule, PHP files need to have a permission (CHMOD) of 644, whereas file folders need a permission of 755. Almost all FTP clients let you check and change the permissions on the files if you need to. Typically, you can find the option to change file permissions in the menu options of your FTP client.

    technicalstuff Some hosting providers run their PHP software in a more secure format called safe mode. If this is the case with your host, you need to set the PHP files to 644. If you’re unsure, ask your hosting provider what permissions you need to set for PHP files.

Last step: Running the install script

The final step in the installation procedure for WordPress is connecting the WordPress software you uploaded to the MySQL database. Follow these steps:

  1. Type this URL in the address window of your browser, replacing yourdomain.com with your own domain name:

    http://yourdomain.com/wp-admin/install.php

    If you chose to install WordPress in a different folder from the root directory of your account, make sure you indicate this fact in the URL for the install script. If you transferred the WordPress software files to a folder called /blog, for example, you would point your browser to the following URL to run the installation: http://yourdomain.com/blog/wp-admin/imstall.php.

    Assuming that you did everything correctly (see Table 3-1 for help with common installation problems), you see the box shown in Figure 3-8.

  2. Select your preferred language.

    WordPress is currently available in 47 different languages. Select the one you prefer and then click Continue.

  3. Click the Let’s Go button.

    WordPress presents you with a message welcoming you to WordPress and gives you a few details about what you need to proceed with the installation, such as your database information.

  4. Dig out the database name, username, and password that you saved earlier, and use that information to fill in the following fields (shown in Figure 3-9):
    • Database Name: Type the database name you used when you created the MySQL database before this installation. Because hosts differ in configurations, enter either the database name or the database name with your hosting account username appended.

      If you named your database wordpress, for example, you would enter that in this text box. Or if your host requires you to append the database name with your hosting account username, you would enter username_wordpress, substituting your hosting username for username. My username is lisasabin, so I would enter lisasabin_wordpress.

    • User Name: Type the username you used when you created the MySQL database before this installation. Depending on what your host requires, you may need to append this username to your hosting account username.
    • Password: Type the password you used when you set up the MySQL database. You don’t need to append the password to your hosting account username here.
    • Database Host: Ninety-nine percent of the time, you’ll leave this field set to localhost. Some hosts, depending on their configurations, have different hosts set for the MySQL database server. If localhost doesn’t work, you need to contact your hosting provider to find out the MySQL database host.
    • Table Prefix: Leave this field set to wp_, although you can change the table prefix to something completely random to increase security for your site, such as xyz123_.
  5. When you have all that information filled in, click the Submit button.

    You see a message that says All right, sparky! You've made it through this part of the installation. WordPress can now communicate with your database. If you're ready, time now to run the install!

  6. Click the Run the Install button.

    You see another welcome page with a message welcoming you to the famous five-minute WordPress installation process.

  7. Enter or possibly change this information (shown in Figure 3-10):
    • Site Title: Enter the title you want to give your blog. The title you enter isn’t written in stone; you can change it later.
    • Username: This is the name you will use to log in to WordPress. By default, the username is admin, and you can leave it that way. However, for security reasons, it’s recommended practice to change your username to something unique to you.
    • Password: Type your desired password in the first text box. Then type it again in the second text box to confirm that you’ve typed it correctly. If the two versions of your password don’t match, WordPress alerts you with an error message. If you don’t enter a password, one will automatically be generated for you.

      tip For security reasons (and so that other people can’t make a lucky guess), passwords should be at least seven characters long and use as many different characters in as many combinations as possible. Use a mixture of uppercase and lowercase letters, numbers, and symbols (such as ! “ ? $ % ^ &).

    • Your Email: Enter the email address you want to use to be notified of administrative information about your blog. You can change this address later, too.
    • Allow search engines to index this site: By default, this check box is selected, which lets the search engines index the content of your website and include your website in search results. To keep your blog private and out of the search engines, deselect this check box.
  8. Click the Install WordPress button.

    The WordPress installation machine works its magic and creates all the tables within the database that contain the default data for your blog. WordPress displays the login information you need to access the WordPress Dashboard. Make note of this username and password before you leave this page. Scribble it down on a piece of paper or copy it into a text editor such as Notepad.

    remember After you click the Install WordPress button, you’ll receive an email with the login information and login URL. This information is handy if you’re called away during this part of the installation process. So go ahead and let the dog out, answer the phone, brew a cup of coffee, or take a 15-minute power nap. If you somehow get distracted away from this page, the email sent to you contains the information you need to successfully log in to your WordPress website.

  9. Click the Log In button to log in to WordPress.

    tip If you happen to lose this page before clicking the Log In button, you can always find your way to the login page by entering your domain followed by the call to the login file (for example, http://yourdomain.com/wp-login.php).

    You know that you’re finished with the installation process when you see the login page, as shown in Figure 3-11. Refer to Table 3-1 if you experience any problems during this installation process; it covers some of the common problems users encounter.

Table 3-1 Common WordPress Installation Problems

Error Message

Common Cause

Solution

Error Connecting to the Database

The database name, username, password, or host was entered incorrectly.

Revisit your MySQL database to obtain the database name, username, and password, and re-enter that information.

Headers Already Sent Error Messages

A syntax error occurred in the wp-config.php file.

Open the wp-config.php file in a text editor. The first line should contain only this line: <?php. The last line should contain only this line: ?>. Make sure that those lines contain nothing else — not even white space. Save the file changes.

500: Internal Server Error

Permissions on PHP files are set incorrectly.

Try setting the permissions (CHMOD) on the PHP files to 666. If that doesn’t work, set them to 644. Each web server has different settings for how it lets PHP execute on its servers.

404: Page Not Found

The URL for the login page is incorrect.

Double-check that the URL you’re using to get to the login page is the same as the location of your WordPress installation (such as http://yourdomain.com/wp-login.php).

403: Forbidden Access

An index.html or index.htm file exists in the WordPress installation directory.

WordPress is a PHP application, so the default home page is index.php. Look in the WordPress installation folder on your web server. If there is an index.html or index.htm file in there, delete it.

image

Figure 3-8: The first time you run the installation script for WordPress, you see this box to select your preferred language.

image

Figure 3-9: At this step of the WordPress installation, enter the database name, username, and password.

image

Figure 3-10: Information needed to finish the WordPress installation.

image

Figure 3-11: You know you’ve successfully installed WordPress when you see the login page.

So do tell — how much time does your watch show for the installation? Was it five minutes? Stop by my blog sometime (http://lisasabin-wilson.com) and let me know whether WordPress stood up to its famous five-minute-installation reputation. I’m a curious sort.

The good news is — you’re done! Were you expecting a marching band? WordPress isn’t that fancy … yet. Give them time, though; if anyone can produce it, the folks at WordPress can.

Let me be the first to congratulate you on your newly installed WordPress blog! When you’re ready, log in and familiarize yourself with the Dashboard, which I describe in Chapter 4.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.1.158