Friday 19 July 2013

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

Uploading the WordPress files via FTP

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

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.

Uploading the WordPress files via FTP

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

Uploading the WordPress files via FTP

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!

 

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.

Downloading the WordPress software

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.

Downloading the WordPress software

Without further ado, get the latest version of the WordPress software at

http://wordpress.org/download.

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 .

Setting up the MySQL database

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.

Setting up the MySQL database

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.

Setting up the MySQL database

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.
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 data-
base WordPress or wpblog, you can be reasonably certain a year from
now when you want to access your database to make some configura-
tion changes that you know exactly which credentials to use.
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.

Setting up the MySQL database

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.

Setting up the MySQL database

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 login screen for
your cPanel.
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. Locate the MySQL Databases icon.
Click the MySQL Databases icon to load the MySQL Databases page in your cPanel.

Setting up the MySQL database

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:

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.

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.

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.