Installing the WordPress Files

Before you're ready to install WordPress, the following needs to be done:

  • Purchase the domain name registration for your account (Chapter 1 of this minibook).
  • Obtain a hosting service on a Web server for your blog (Chapter 1 of this minibook).
  • Establish your hosting account username, password, and File Transfer Protocol (FTP) address (Chapters 1 and 2 of this minibook).
  • Acquire an FTP client for transferring files to your hosting account (Chapter 2 of this minibook).

If you omitted any of the preceding items, flip to the chapter listed to complete the step.

Using Fantastico to install WordPress

Fantastico is a very popular script installer that several Web hosting providers make available to their clients. Fantastico contains different types of scripts and programs that you can install on your hosting account, notably, the WordPress software.

Here we make a few assumptions about your hosting environment:

  • Your hosting provider has Fantastico available for your use.
  • Your hosting account has the cPanel account management interface.

image If your hosting provider doesn't give you access to an installation script, such as Fantastico, skip to the next section in this chapter for the steps to install WordPress manually, via FTP.

Follow these steps to install WordPress with Fantastico:

  1. Log in to the cPanel for your hosting account:
    1. Browse to http://yourdomain.com/cpanel (where yourdomain.com is your actual domain name) to bring up the cPanel login screen.
    2. Enter your specific hosting account username and password in the login fields and then click OK. The page refreshes and displays the cPanel for your account.
  2. Click the Fantastico icon.

    The Fantastico page loads in your browser window and displays a list of available scripts on the left side of the page, as shown in Figure 4-1.

  3. Click the WordPress link in the Blogs heading.

    The WordPress page loads, displaying a short description of WordPress and the version that's available with Fantastico. (See Figure 4-2.)

    image Fantastico is a third-party script that exists as an add-on to cPanel. Web hosts subscribe to Fantastico and add it to your cPanel as an extra service for you to take advantage of; however, Web hosting providers do not control which scripts, or which versions of scripts, are available within Fantastico. Web hosts are completely dependent upon the makers of Fantastico as to what scripts and script versions are available. Fantastico is usually about a month or so behind the game when updating the programs in its script installer.

    Figure 4-1: The Fantastico script installer page within cPanel.

    image

    Figure 4-2: The WordPress page in Fantastico.

    image

  4. Click the New Installation link.

    The Install WordPress (1/3) page, shown in Figure 4-3, displays.

  5. Select the WordPress installation location by choosing the domain you want to install WordPress on from the Install on Domain drop-down list.
  6. Type the directory name for installation in the Install in Directory text field.

    Leave this text field empty to install WordPress in the root directory (http://yourdomain.com), or enter the name of the directory you want to install WordPress into, such as http://yourdomain.com/wordpress. If you type in this text field, the directory should not exist on your Web server; if it does, Fantastico tells you that WordPress can't be installed.

  7. Provide the Admin Access Data info by typing the desired username in the Administrator Username text field and then typing your desired password in the Password text field.

    These two items are the username and password for the WordPress administrator, and you use them to log in to the WordPress Dashboard after it's installed (See Book III, Chapter 1).

    Figure 4-3: WordPress access and admini-strator data in Fantastico.

    image

  8. Provide the Base Configuration info for WordPress.

    The information you enter in this section can be changed later in the general settings of the WordPress Dashboard (after it's installed and you've logged in). Enter the info as follows:

    1. Type your desired nickname in the Admin Nickname text field.

      This name displays on your Web site after you start publishing to your WordPress blog.

    2. Type your e-mail address in the Admin E-Mail text field.

      This e-mail address is used for your administrator user account in WordPress, after it's installed on your Web server in Step 9.

    3. Type your site name in the Site Name text field.

      The site name displays on your site, and can be changed later, if you want.

    4. Type a short description of your site in the Description text field.

      The description displays on your site, and can be changed later, if you want.

  9. Click the Install WordPress button.

    The Install WordPress (2/3) page displays with several messages. The Fantastico script installer creates the MySQL database for you and displays the name of the database. This page also displays a confirmation message on the domain and directory that WordPress is installed into.

  10. Click the Finish Installation button.

    The page refreshes in your browser and Fantastico displays a message confirming the success of the WordPress installation and displays the login URL, username, and password.

    If you enter your own e-mail address in the Email the Details of This Installation To text field and then click the Send E-mail button, the URL, username, and password are sent to your inbox for safe storage. (This is an optional feature, but we strongly recommend doing this in case your browser crashes and you lose the information.)

Your WordPress installation via Fantastico is complete, and you're ready to start using WordPress on your Web server. If you installed WordPress by using the Fantastico method and don't want to review the steps to install WordPress manually, flip to Chapter 5 in this minibook to optimize your WordPress installation for performance and security.

Installing WordPress manually

If you 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 deadline.

image The famous five-minute installation includes only the time it takes to install the software. This doesn't include the time to register a domain name; the time to obtain and set up your Web hosting service; or the time to download, install, configure, and figure out how to use the FTP software.

Setting up the MySQL database

The WordPress software is a personal publishing system that uses a PHP/MySQL platform, which provides everything you need to create your own blog and publish your own content dynamically without knowing how to program those pages. 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, we use the popular hosting cPanel interface. If your host provides a different interface, the same basic steps apply; however, the setup in the interface that your Web host provides may be different.

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

  1. Log in to the cPanel for your hosting account:
    1. Browse to http://yourdomain.com/cpanel (where yourdomain.com is your actual domain name) to bring up the login screen for your cPanel.
    2. Enter your specific hosting account username and password in the login fields, and then click OK. The page refreshes and displays the cPanel for your account.
  2. Locate the MySQL Databases icon.

    Click the MySQL Databases icon to load the MySQL Databases page in your cPanel.

  3. Enter a name for your database in the Name text box.

    Be sure to make note of the database name because you need it to install WordPress.

  4. Click the Create Database button.

    A message appears confirming that the database was created.

  5. Click the Go Back link or 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 to the approximate 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.

    image 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. For instance, if you name a database WordPress or wpblog, 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.

    image Make sure that you note the database name, username, and password that you set up during this process. You need them in the section “Running the installation script” later in this chapter 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, make sure that you have them handy.

  8. Click the Go Back link or 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.

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

  12. Click the Go Back link or the Back button on your browser toolbar.

    You return to the MySQL Databases page.

The MySQL database for your WordPress Web site is complete and you're ready to proceed to the final step of installing the software on your Web server.

Downloading the WordPress software

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

image WordPress gives you two compression formats for the software: .zip and .tar.gz. We recommend getting the Zip file because it's the most common format for compressed files and both Windows and Mac operating systems can use the format. Generally, the .tar.gz file format is used for Unix operating systems.

Download the WordPress software to your computer and then decompress (unpack or unzip) it to a folder on your computer's hard drive. These steps begin the installation process for WordPress. Having the program on your own computer isn't enough, however. You also need to upload (or transfer) it to your Web server account (the one you obtained in Chapter 1 of this minibook).

Before you install WordPress on your Web server, you need to make sure that you have the MySQL database set up and ready to accept the WordPress installation. Be sure that you've followed the preceding steps to set up your MySQL database before proceeding.

Uploading the WordPress files via FTP

To upload the WordPress files to your host, return to the /wordpress folder (shown in Figure 4-4) on your computer where you unpacked the WordPress software that you downloaded earlier. If you need a review on using FTP (File Transfer Protocol) to transfer files from your computer to your Web server, review Chapter 2 in this minibook.

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

Figure 4-4: WordPress installation files to be uploaded to your Web server.

image

image 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 Lisa's Web server, her root directory is the public_html folder; some of her clients have a root directory in an httpdocs folder. 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 upload 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 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 by 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 choose 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 /blog folder (where yourdomain is your domain name).
  • 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. Generally, PHP files need to have a permission (Chmod is explained in Chapter 2 of this minibook) of 666, 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 within the menu options of your FTP client.

image Some hosting providers run their PHP software in a more secure format — 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.

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 Web site into the address bar in your Web browser.

    If you chose to install WordPress in a different folder from the root directory of your account, make sure you indicate that in the URL for the install script. For example, if you transferred the WordPress software files to the /blog folder, for example, you point your browser to the following URL to run the installation: http://yourdomain.com/blog/wp-admin/install.php. If WordPress is in the root directory, use the following URL to run the installation: http://yourdomain.com/wp-admin/install.php (where yourdomain is your domain name).

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

    Figure 4-5: The first time you run the installation script for WordPress, you see this message.

    image

  2. Click the Create a Configuration File button.

    The Welcome to WordPress page appears, giving you the information you need to proceed with the installation.

  3. Click the Let's Go button at the bottom of that page.
  4. Dig out the database name, username, and password that you saved in the earlier section “Setting up the MySQL database,” and use that information to fill in the following fields, as shown in Figure 4-6:
    • Database Name: Type the database name you used when you created the MySQL database before this installation. Because hosts differ in configurations, you need to enter the database name by itself or a combination of your username and the database name, separated by an underscore mark (_).

      If you named your database wordpress, for example, you enter thatin this text box. If your host requires you to append the database name with your hosting account username, you enter username_wordpress, substituting your hosting username for username. Lisa's username is lisasabin, so she enters 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 enter a combination of your hosting account username and the database username separated by an underscore mark (_). In Figure 4-6, you can see both: lisasabin_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.

      Figure 4-6: Entering the database name, username, and password.

      image

    • Database Host: Ninety-nine percent of the time, you 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_.

      You can change the table prefix to create an environment secure from outside access. See Chapter 5 for more information.

  5. After you fill in that information, 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 to run the install!”

  6. Click the Run the Install button.

    Another welcome page appears with a message welcoming you to the famous five-minute WordPress installation process.

  7. Enter the following information, as shown in Figure 4-7:
    • 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 displays on your site.
    • Username: This is the name you use to log in to WordPress. By default, the username is admin, and you can leave it that way. However, for security reasons, I recommend you change your username to something unique to you. This username is different from the one you set for the MySQL database in previous steps. You use this username when you log in to WordPress to access the Dashboard (see Book III), so be sure to make it something you'll remember.
    • Password, Twice: Type your desired password in the first text box and then type it again in the second 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 is generated automatically for you. For security reasons, it's a good thing to set a different password here than the one you set for your MySQL database in the previous steps — just don't get them confused.

      image For security reasons (and so 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 ! “ ? $ % ^ &).

      Figure 4-7: Finishing the WordPress installation.

      image

    • Your E-Mail: Enter the e-mail address you want to use to be notified of administrative information about your blog. You can change this address later, too.
    • Allow My Blog to Appear in Search Engines Like Google and Technorati: By default, this check box 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 Book III).
  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 them on a piece of paper or copy them into a text editor, such as Notepad.

    image After you click the Install WordPress button, you're sent an e-mail 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 e-mail sent to you contains the information you need to log in to your WordPress blog.

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

    image 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 — where yourdomain is your domain name).

You know that you're finished with the installation process when you see the login page, as shown in Figure 4-8. Check out Table 4-1 if you experience any problems during this installation process; it covers some of the common problems users run into.

So do tell — how much time does your watch show for the installation? Was it five minutes? Stop by Lisa's blog sometime at http://lisasabin-wilson.com and let Lisa know whether WordPress stood up to its famous five-minute installation reputation. She's 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.

Figure 4-8: You know you've run a successful WordPress installation when you see the login page.

image

Table 4-1 Common WordPress Installation Problems

image

image

Let us 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 we describe in Book III.

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

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