Friday 19 July 2013

Installing the WordPress Files

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).

 

Installing the WordPress Files

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.

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:

a. Browse to http://yourdomain.com/cpanel (where yourdomain.
com is your actual domain name) to bring up the cPanel login screen.

b. 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.)

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 avail-
able 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 updat-
ing the programs in its script installer.

Installing WordPress on Your Web Server

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.

Installing WordPress on Your Web Server



 The chapter takes you through two installation methods for WordPress —

an automatic, one-click installation with the Fantastico script installer,


which is available from your Web hosting provider, and manual installation.

I also show you how to set up a MySQL database by using the cPanel

Web hosting management interface. By the time you’re done reading this chapter, you’ll be logged in to and looking at your brand-spanking-new WordPress Dashboard, ready to start publishing content right away (if you already have WordPress installed, go ahead and skip to Chapter 5 in this minibook, which contains great information about configuring WordPress for optimum performance and security).

Managing Your MySQL Database

✦ wp_signups: This table stores information about user sign-ups that

includes all the information from the wp_registration_log table, the date the user account was activated, and the unique activation key the user accessed during the sign-up process.

✦ wp_site: This table stores information about your main installation site
including the site ID, domain, and server path.

✦ wp_sitemeta: This table stores all the information about the Multisite
configurations set after you install the Multisite feature. See Book VIII.

Managing Your MySQL Database

✦ wp_blogs: This table stores information about each blog created in
your network, including

•  A unique blog numerical ID

•  A unique site ID number (determines the ID of the site the blog
belongs to)

•  The blog domain

•  The blog server path

•  The date the blog was registered

•  The date the blog was updated

•  The blog status (public, private, archived, spam; see Book VIII for
more information on blog status)

✦ wp_blog_versions: This table stores general information about each
network blog ID, database version, and date of last update.

✦ wp_registration_log: This table stores information about registered
users, including

•  Unique user numerical ID

•  User e-mail address

•  Users IP address

•  Users Blog ID

•  The date the user registered




✦ wp_users: The list of users with an account on your WordPress Web
site is maintained within this table and includes

•  The username, first name, last name, and nickname

•  The user login

•  The user password


•  The user e-mail




•  The registration date

•  The user status and role (subscriber, contributor, author, editor, or
administrator)

Most Web hosting providers give you a utility, or an interface, to view your
MySQL database, and the most common one is phpMyAdmin (as shown in
Figure 3-2). If you’re unsure how you can view your database on your host-
ing account, get in touch with your hosting provider to find out.


 When the Multisite feature in WordPress is activated (check out Book VIII for information about the Multisite feature), WordPress adds six additional tables in the database:


 

Managing Your MySQL Database



✦ wp_terms: This stores the categories you’ve created for posts and links
as well as tags that have been created for your posts.

 


✦ wp_term_relationships: This stores the relationships among the

posts as well as the categories and tags that have been assigned to
them.

✦ wp_term_taxonomies: WordPress has three types of taxonomies by
default: category, link, and tag. This table stores the taxonomy associ-
ated for the terms stored in the wp_terms table.

✦ wp_usermeta: This table features metadata from every user with an
account on your WordPress Web site. This metadata includes

•  A unique user ID

•  A user meta key, meta value, and meta ID, which are unique identi-
fiers for users on your site

Managing Your MySQL Database

✦ wp_postmeta: This includes all posts or pages published to your site
and contains metadata that includes

•  The unique post ID number. (Each blog post has a unique ID number
to set it apart from the others.)

•  The post meta key, meta value (unique numerical identifiers for each
post created on your site), and any custom fields you’ve created for

the post.

✦ wp_posts: This table features the body of any post or page you’ve pub-
lished to your blog, including autosaved revisions and post option set-

tings, such as

•  The post author, date, and time

•  The post title, content, and excerpt

•  The post status (published, draft, or private)

•  The post comment status (open or closed)

•  The post type (page, post, or custom post type)

•  The post comment count

Managing Your MySQL Database

✦ wp_links: This stores the name, URL, and description of all Links
you create by using the WordPress Link Manager. It also stores all the

advanced options for the links you created, if any.

✦ wp_options: This stores all the option settings that you set for
WordPress after you install it, including all theme and plugin option

settings.

Managing Your MySQL Database



•  A unique comment ID number

•  A comment meta key, meta value, and meta ID (unique numerical

identifiers assigned to each comment left by you, or visitors, on your
site)

✦ wp_comments: This table stores the body of the comments published to
your site, including

•  A post ID that specifies which post the comment belongs to

•  The comment content

•  The comment author’s name, URL, IP address, and e-mail address


 

•  The comment date (day, month, year, and time)

•  The comment status (approved, unapproved, or spam)

Managing Your MySQL Database

Currently, WordPress requires MySQL version 4.1.2 (or greater) in order to work correctly. If your Web hosting provider doesn’t have 4.1.2 (or greater) installed on your Web server, kindly ask to upgrade.

After WordPress is installed on your server (which I discuss in Chapter 4 of this minibook), the database gets populated with 11 tables that exist to store different types of data from your WordPress blog. Figure 3-2 displays the structure of the tables, as follows:

✦ wp_commentmeta: This table stores every comment published to your
site contains information, or metadata, that includes

Managing Your MySQL Database

 

Many new WordPress users are intimidated by the MySQL database, per-

haps because it seems to be way above their technical skills or abilities.

Truth be told, regular users of WordPress — those who just use it to publish
content — don’t really ever have to dig into the database unless they want
to. You only need to explore the database if you’re dealing with theme or
plugin development, or with contributing code to the WordPress project. In
this section, we give you a basic overview of the WordPress database stored
in MySQL so that you have an understanding of the structure and know
where items are stored.

Trying Out a Little PHP



A single line of text displays: Testing my new PHP function, as shown in Figure 3-1.

If the testing.php file displays correctly in your browser, congratulations! You programmed PHP to work in a Web browser!

 

If the testing.php file doesn’t display correctly in your browser, a PHP

error message will give you an indication of the errors in your code. (Usually
included with the error message is the line number where the error exists in
the file.)

Trying Out a Little PHP

After you write your code, follow these steps to save and upload your file:

 

1. Save the file to your local computer as testing.php.

2. Upload the testing.php file.

Via File Transfer Protocol, upload testing.php to the root directory of
your Web server. If you need a review on how to use FTP to transfer files
to your web server, review the information presented in Book II, Chapter 2.

3. Open a Web browser and type the address (http://yourdomain.com/

testing.php) in the Web browser’s address bar (where yourdomain is your actual domain name).