Chapter 3

Setting Up Blogging Base Camp

IN THIS CHAPTER

check Finding and buying a domain name

check Finding web hosting

check Brushing up on SFTP

check 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. Sometimes, it 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).

remember A word to the wise here: Just because you 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.

If you want to avert this problem, you can register your domain name with all available extensions. My personal website, for example, has the domain name lisasabin-wilson.com, but I also own lisasabin-wilson.net just in case someone else out there has the same combination of names.

Considering the cost of a domain name

Registering a domain costs you anywhere from $3 to $300 per year, depending on what service you use for a registrar and what options (such as storage space, bandwidth, privacy options, search-engine submission services, and so on) 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 nearby “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 for that account. The registrar sends you a reminder a few months in advance, telling you that 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; https://www.icann.org). 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 offered 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 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 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’ve 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 person 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 $10 to $30 per month or more, depending on your needs.

Some 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 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:

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

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, or use the live chat on their website if they have it, 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 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 are 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 the 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 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: The amount of space you can access on the web servers’ hard drive, generally measured in megabytes (MB) or gigabytes (GB).
  • Bandwidth transfer: The amount of transfer your site can do per month. Typically, traffic is measured in gigabytes.

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 the 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 worth 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 10GB to 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 need. Also, the more visitors and traffic your website has, the more bandwidth you 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, 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 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 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 10GB 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 will save you a few headaches down the road.

warning Be wary of hosting providers that offer things like unlimited bandwidth, domains, and disk space. Those offers are great selling points, but what the providers don’t tell you outright (you may have to look into the fine print of the agreement) is that although they may not put those kinds of limits on you, they limit your site’s CPU usage.

CPU (which stands for central processing unit) is the part of a computer (or web server, in this case) that handles all the data processing requests sent to your web servers whenever anyone visits your site. Although you may have unlimited bandwidth to handle a large amount of traffic, if a high spike in traffic increases your site’s CPU usage, your host will throttle your site because it limits CPU use.

What do I mean by throttle? I mean that the host shuts down your site — turns it off. The shutdown isn’t permanent; it lasts maybe a few minutes to an hour. The host does this to kill any connections to your web server that are causing the spike in CPU use. Your host eventually turns your site back on, but the inconvenience happens regularly with many clients across various hosting environments.

tip When you look into different web hosting providers, ask about their policies on CPU use and what they do to manage a spike in processing. It’s better to know up front than to find out after your site’s been throttled.

Understanding Secure File Transfer Concepts

This section introduces you to the basic elements of SFTP (Secure File Transfer Protocol), which is a method of transferring files in a secure environment. SFTP provides an additional layer of security beyond what you get with regular FTP, as it uses SSH (Secure Shell) and encrypts sensitive information, data, and passwords so that they aren’t clearly transferred within the hosting network. Encrypting the data ensures that anyone monitoring the network can’t read the data freely — and, therefore, can’t obtain information that should be secured, such as passwords and usernames.

SFTP offers two ways of moving files from one place to another:

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

SFTP 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 I highly recommend using SFTP instead of FTP (File Transfer Protocol), because it’s a secure connection to your web host. If your web hosting provider doesn’t provide SFTP connections for you, strongly consider switching to a hosting provider that does. Almost all hosting providers these days provide SFTP as the standard protocol for transferring files.

Setting up SFTP on your hosting account

Many web hosts today offer SFTP as part of their hosting packages, so just confirm that your hosting provider makes SFTP 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. You find the settings within the hosting account management interface, where you can set up the SFTP 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 the same, but you need to ask your hosting provider for the specific details you need to adapt these directions to your environment.

Mostly, SFTP for your hosting account is set up automatically. Figure 3-1 shows the User Accounts page in cPanel, where you set up user accounts for SFTP access.

image

FIGURE 3-1: The User Accounts page within cPanel.

Follow these steps to get to this page and set up your SFTP account:

  1. Log in to cPanel for your hosting account. Typically, you browse to http://yourdomain.com/cpanel to bring up the login screen for your cPanel. Enter your hosting account username and password in the login fields and then click OK.
  2. Browse to the User Manager page.

    Click the SFTP Accounts link or icon in your cPanel to open the User Manager page (refer to Figure 3-1).

  3. View the existing SFTP account.

    If your hosting provider automatically sets you up with an SFTP account, you see it in the User Manager section. Ninety-nine percent of the time, the default SFTP 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.

If the SFTP Accounts page doesn’t display a default SFTP user in the User Management section, you can easily create one in the Add SFTP Account section by following these steps:

  1. Fill in the provided fields.

    The fields of the User Manager page ask for your name, desired username, domain, and email address.

  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 whether your password is Very Weak, Weak, Good, Strong, or Very Strong (not shown in Figure 3-1, but you find it farther down on the same screen). You want to have a very strong password for your SFTP account that’s difficult for hackers and malicious Internet users to guess and crack.

  4. In the Services section, click the Disabled icon within the FTP section.

    This action changes the icon label to Enabled and enables FTP for the user you are creating.

  5. Indicate the space limitations in the Quota field.

    Because you’re the site owner, leave the radio-button selection set to Unrestricted. (In the future, if you add a new 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, such as 50MB.)

  6. (Optional) Type the directory access for this SFTP user.

    cPanel fills in this information for you: something like public_html/user. (The user, in this case, is the same username you entered in Step 1.) Leaving this field as is gives the new SFTP user access only to a folder with his or her 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.

  7. Click the Create button.

    You see a new screen with a message that the account was created successfully. Additionally, you see the settings for this new user account.

  8. Copy and paste the settings into a blank text editor window (such as Notepad for PC or TextEdit for Mac users).

    The settings for the user account are the details you need to connect to your web server via SFTP. Save the following settings:

    • Username: username@yourdomain.com
    • Password: yourpassword
    • Host name: yourdomain.com
    • SFTP Server Port: 22
    • Quota: Unlimited MB

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

tip Ninety-nine point nine percent of the time, the SFTP Server Port is 22. Be sure to double-check your SFTP settings to make sure that this is the case, because some hosting providers use different port numbers for SFTP.

remember At any time, you can revisit the User Accounts page to delete the user accounts you’ve created, change the quota, change the password, and find the connection details specific to that account.

Connecting to the web server via SFTP

SFTP programs are referred to as SFTP clients or SFTP client software. Whatever you decide to call it, an SFTP client is software that you use to connect to your web server to view, open, edit, and transfer files to and from your web server.

Using SFTP to transfer files requires an SFTP client. Many SFTP clients are available for download. Here are some good (and free) ones:

For the purposes of this chapter, I use the FileZilla SFTP client (https://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 SFTP client software.

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

remember If you use a different SFTP client software from FileZilla, you need to adapt your steps and practice for the specific SFTP client software you’re using.

Connecting to a web server is an easy process. The SFTP settings you saved from Step 8 in “Setting Up SFTP on Your Hosting Account” earlier in this chapter are the same settings you see in your cPanel User Manager page if your SFTP was set up automatically for you:

  • Username: username@yourdomain.com
  • Password: yourpassword
  • Server: yourdomain.com
  • SFTP Server Port: 22
  • Quota: Unlimited MB

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

  1. Open the SFTP 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. (I used WPFD — short for WordPress For Dummies.)

  5. Enter the SFTP server in the Host field.

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

  6. Enter the SFTP port in the Port field.

    Typically, SFTP uses port 22, and this setting generally never changes. My host, on the other hand, uses port 2222 for SFTP. In case your host is like mine and uses a port other than 22, 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 SFTP clients). Choose SFTP – SSH File Transfer Protocol from the Protocol drop-down menu, as shown in Figure 3-4.

  8. Select the logon type.

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

  9. Enter your username in the Username field.

    This entry is the username given to you in the SFTP settings.

  10. Type your password in the Password field.

    This entry is the password given to you in the SFTP settings.

  11. Click the Connect button.

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

image

FIGURE 3-3: The Site Manager utility in the FileZilla SFTP client software.

image

FIGURE 3-4: The FileZilla Site Manager utility with SFTP 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 SFTP 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 SFTP 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.

SFTP 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 on 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 on 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 4 of this book.

Editing files via SFTP

At times, 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. Another way is to use the edit feature built into most SFTP client software by following these steps:

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

    Right-click the file, and choose View/Edit from the shortcut menu. (Remember that I’m using FileZilla; your SFTP client may use different labels, such as Open or Edit.) FileZilla, like most SFTP 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 SFTP 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.

  7. Click the Yes button.

    The newly edited file replaces the old one.

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

warning When you edit files with the SFTP 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 in the saved file and your website goes haywire, you have a copy of the original file to upload to restore the file to its original state.

technicalstuff Programmers and developers are people who generally are more technologically advanced than your average user. These folks typically don’t use SFTP for editing or transferring files. Instead, they use a version-control system called Git. Git manages the files on your web server through a versioning system that has a complex set of deployment rules for transferring updated files to/from your server. Most beginners don’t use such a system for this purpose, but Git is a system that beginners can use. If you’re interested in using Git, you can find a good resource to start with at SitePoint (https://www.sitepoint.com/git-for-beginners).

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. A lot of permissions are available, 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 executable by anyone. For security reasons, you shouldn’t use this set of permissions on your web server unless absolutely necessary.

Typically, folders and files within your web server are assigned permissions of 644 or 755. Usually, you 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 section gives you a basic look at file permissions because usually, you don’t 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 at www.elated.com/articles/understanding-permissions/.

You may find yourself in a situation in which you’re asked to edit and change the file permissions on a particular file on your web server. For WordPress sites, this situation usually happens when you’re 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. 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 SFTP program to CHMOD a file or edit its permissions on your web server:

  1. Connect the SFTP 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 from the shortcut menu. (Your SFTP client, if not FileZilla, may use different terminology.)

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

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

    This number is 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, 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 dialog box.

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 Secure File Transfer Protocol (SFTP) address see Chapter 2
  • Acquired an SFTP client for transferring files to your hosting account see Chapter 2

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 easier by providing things like a step-by-step wizard or an easy interface. Check with your hosting provider to see whether it provides a WordPress installer for you to use.

Exploring Preinstalled WordPress

The WordPress software has become such a popular publishing tool that almost all hosting providers available today provide WordPress for you in a couple of ways:

  • Already installed on your hosting account when you sign up
  • A user dashboard with a utility for installing WordPress from within your account management system

tip If your hosting provider doesn’t give you access to an installation utility, skip to “Installing WordPress manually” later in this chapter for the steps to install WordPress via SFTP.

One of the most popular web hosts for managed WordPress hosting is a service called WP Engine, which you can find at https://wpengine.com. The service provides a handy, easy-to-use installation utility that’s built right into your account dashboard at WP Engine to allow you to get up and running with WordPress right away.

You may not be using WP Engine, so your host may have a slightly different utility, but the basic concept is the same. Be sure to apply the same concepts to whatever kind of utility your hosting provider gives you. To access the account dashboard of WP Engine, follow these steps:

  1. Log in to the WP Engine user dashboard.
    1. Browse to https://my.wpengine.com to bring up the login screen.
    2. Enter the email address you used to sign up, enter your password, and then click Log In. The page refreshes and displays the dashboard for your account.
  2. Click the Add Install link.

    The Add Install page displays in your browser window, as shown in Figure 3-7.

  3. Type the name of your new WordPress installation in the Install Name field.

    This name is the temporary domain name of your new website. As shown in Figure 3-8, I’m using wpfd, which stands for WordPress For Dummies. This step creates the domain name wpfd.wpengine.com.

  4. Choose Create a New Install from the Copy From drop-down list.

    This step creates a new installation of WordPress in your account.

  5. Leave the Create a Transferable Install check box unselected.

    technicalstuff There may come a day where you want to create a WordPress installation that can be transferred between two WP Engine accounts, but today isn’t that day. You can read about the process at https://wpengine.com/support/billing-transfer-information-for-developers.

  6. Leave the Enable WordPress Multisite check box unselected.

    For the purposes of basic WordPress installation and setup, don’t worry about this option for now. I cover WordPress multisite features in depth in Chapter 13.

  7. Click the Create Install button.

    This step creates the WordPress installation in your account and takes you to the Overview page, where a message states that your WordPress installation is being created. When the installation is ready to use, you receive an email from WP Engine.

    tip In my experience, WP Engine always has the most up-to-date version of WordPress available for installation. Be sure to check that your hosting provider is supplying the latest version of WordPress with its installation utility.

image

FIGURE 3-7: The Add Install module within a WP Engine account dashboard.

image

FIGURE 3-8: The Add Install page at WP Engine.

Installing WordPress manually

Doing a manual install of WordPress is where the rubber meets the road — that is, where you’re putting WordPress’s famous five-minute installation to the test. Set your watch and see whether you can meet that five-minute goal.

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 SFTP 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, but 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 installation of WordPress later.

  4. Click the Create Database button.

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

  5. Click the Back button on your browser toolbar.

    The MySQL Databases page displays in your browser window.

  6. Locate MySQL Users on the MySQL Databases page.

    Scroll approximately to the middle of the page to locate this section.

  7. Choose a username and password for your database, enter them in the Username and Password text boxes, and then click the Create User button.

    A confirmation message appears, stating that the username was created with the password you specified.

    tip For security reasons, make sure that your password isn’t something that sneaky hackers can easily guess. Give your database a name that you’ll remember later. This practice is especially helpful if you run more than one MySQL database in your account. If you name a database WordPress or wpblog, for example, you can be reasonably certain a year from now, when you want to access your database to make some configuration changes, that you know exactly which credentials to use.

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

  8. Click the Back button on your browser toolbar.

    The MySQL Databases page displays in your browser window.

  9. In the Add Users to Database section of the MySQL Databases page, choose the user you just set up from the User drop-down list and then choose the new database from the Database drop-down list.

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

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

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

  11. Click the Make Changes button.

    The resulting page displays a message confirming that you’ve added your selected user to the selected database.

  12. Click the Back button on your browser toolbar.

    You return to the MySQL Databases page.

The MySQL database for your WordPress website is complete, and you’re ready to proceed to the final step of installing the software on your web server.

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 in a folder called /wordpress (see Figure 3-9).

image

FIGURE 3-9: WordPress software files to be uploaded to your web server.

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

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 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 SFTP 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 SFTP have two forms: ASCII and binary. Most SFTP 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 SFTP.
    • 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 SFTP 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, 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 SFTP 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 SFTP 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 installation 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 the URL of your website in the address bar of your web browser (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 that 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, point your browser to the following URL to run the installation: http://yourdomain.com/blog/wp-admin/install.php.

    Assuming that you did everything correctly, you should see the first step in the installation process as shown in Figure 3-10.

    tip If you have troubles at any point in the installation, refer to Table 3-1 at the end of these steps for some troubleshooting tips.

  2. Select your preferred language from the list provided on the setup page (refer to Figure 3-10).

    At this writing, WordPress is available in 87 languages. For these steps, I’m using English (United States).

  3. Click the Continue button.

    You see a new page with a welcome message from WordPress and instructions that you need to gather the MySQL information you saved earlier in this chapter.

  4. Click the Let’s Go button.

    A new page loads, displaying fields you need to fill out.

  5. Dig out the database name, username, and password that you saved (refer to “Setting up the MySQL database” earlier in this chapter), and use that information to fill in the following fields, as shown in Figure 3-11:
    • 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, enter wordpress in this text box. If your host requires you to append the database name with your hosting account username, enter username_wordpress, substituting your hosting username for username. My username is lisasabin, so I’d enter lisasabin_wordpress.

    • Username: 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, contact your hosting provider to find out the MySQL database host.
    • Table Prefix: Leave this field set to wp_.
  6. 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!

  7. Click the Run the Install button.

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

  8. Enter or possibly change this information shown in Figure 3-12:
    • Site Title: Enter the title you want to give your site. The title you enter isn’t written in stone; you can change it later, if you like. The site title also appears on your site.
    • Username: Enter the name you use to log in to WordPress. By default, the username is admin, and you can leave it that way. For security reasons, however, I recommend that you change your username to something unique. This username is different from the one you set for the MySQL database earlier in this chapter. You use this username when you log in to WordPress to access the Dashboard (see Chapter 4), so be sure to make it something you’ll remember.
    • Password: Type your desired password in the text box. If you don’t enter a password, one is generated automatically for you. For security reasons, it’s a good thing to set a different password here from the one you set for your MySQL database; just don’t get the passwords confused.

      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 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 at which you want 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 (not shown in Figure 3-12) is selected, which lets the search engines index the content of your blog and include your blog in search results. To keep your blog out of the search engines, deselect this check box. (See Chapter 13 for information on search engine optimization.)
  9. 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 site. 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 them on a piece of paper or copy them into a text editor, such as Notepad (PC) or TextEdit (Mac).

    remember After you click the Install WordPress button, you 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 log in to your WordPress website.

  10. 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, shown in Figure 3-13.

image

FIGURE 3-10: Choose the language for your installation.

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

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.

Make sure 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 the folder contains an index.html or index.htm file, delete it.

image

FIGURE 3-11: Entering the database name, username, and password.

image

FIGURE 3-12: Finishing the WordPress installation.

image

FIGURE 3-13: You’ve successfully installed WordPress when you see the login page.

If you experience any problems during the installation process, Table 3-1 covers some of the common problems users encounter.

So do tell — how much time does your watch show for the installation? Was it five minutes? Drop me a line on Twitter (@LisaSabinWilson) 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 it time, though; if anyone can produce one, the folks at WordPress can.

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