Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
WordPress for Education

You're reading from   WordPress for Education Create interactive and engaging e-learning websites with WordPress book and ebook

Arrow left icon
Product type Paperback
Published in Jun 2012
Publisher Packt
ISBN-13 9781849518208
Length 144 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Adam Scott Adam Scott
Author Profile Icon Adam Scott
Adam Scott
Arrow right icon
View More author details
Toc

Chapter 1. Installing and Configuring WordPress

Running our own hosted WordPress installation will provide us with power and flexibility that is not available through free blog services. In this chapter, we'll walk through the process of installing WordPress on a server. Once WordPress is installed we'll explore the WordPress dashboard interface, learn the difference between posts and pages, and adjust our site's settings.

Installing WordPress

To power our site, we will need access to a web server. This can be achieved by either purchasing a web hosting account or discussing web hosting possibilities with the IT department within our institution.

As of version 3.2 or later, the requirements for WordPress are PHP 5.2.4 or greater and MySQL 5.0 or greater. If these acronyms seem frightening, don't worry, just be aware that PHP is the web scripting language that will power our WordPress installation and MySQL is the database that will store all of our content.

Many educational institutions have begun to offer WordPress installations to faculty, staff, and students. These installations come free-of-charge with a domain name already in place. Speak with your IT department to see if your school provides this service.

If your institution does not provide WordPress installations, we will cover two additional ways in which WordPress can be installed. If you plan to purchase web hosting from a third-party company, follow the instructions in the purchased hosting portion of the chapter. If your institution or IT department provides web hosting services, but does not provide WordPress installations, follow the instructions for manually installing WordPress.

Purchased hosting

Installing WordPress is a relatively straightforward procedure. In fact, the WordPress team has dubbed it the Famous 5-Minute Install. It can, however, require a bit of technical know-how. For that reason, I recommend using a web hosting service that offers a "one-click" WordPress installation. Essentially, this means that the service will run the installation for us.

Choosing a web host can feel a bit overwhelming. Luckily, WordPress offers a list of recommended web hosts (http://wordpress.org/hosting/). Each of these hosts, with the exception of Laughing Squid, offers "one-click" installations of WordPress and due to their wide use among the WordPress community, it is often easy to find solutions to any hosting related technical problem. While these are the hosts recommended by WordPress, nearly any modern commercial web host will meet the WordPress requirements. If you are interested in performing a manual WordPress installation, follow the instructions given in the in-house hosting portion of the chapter.

The hosts recommended by WordPress are:

Once we have selected a web host, the next step is to choose an appropriate hosting plan. For a simple class site, the basic plan of nearly any web host will work well. For sites that utilize the WordPress MultiSite or BuddyPress features discussed later in the book, we may need to choose something more robust. These sites tend to use more bandwidth and require a larger database, making a more fully-featured hosting plan a wise decision. If you are unsure of which plan will work best for your site, contact the hosting provider and they will guide you to the service that is best suited for your needs.

I have had a very positive experience working with Media Temple's Grid-Service hosting. At $20 per month, it is the most expensive hosting option listed, but I am currently using a single account to power several WordPress installations, including a BuddyPress site.

Installing WordPress with purchased hosting

The first step in setting up our hosting is obtaining a domain name. Domain names are the public address of your site and must be purchased and renewed annually. The cost of domain registration varies but is most often around $10-$15 per year.

To register our domain, we must find an available domain name. A domain name is a unique identifier such as example.org. Domain names end with top-level domain names such as .com, .net, .org, or .info. For educational use, I recommend avoiding .com as it is designed for commercial services and as the most commonly used domain extension, it is also the most difficult to find available domain names.

Note

Example URLs

Throughout this book I will use example.org as our sample URL. Anywhere you see example.org, it should be replaced with your unique URL.

Once we have found a suitable domain name, we can continue setting up an account with our chosen hosting provider. With our hosting account activated, we are ready to install WordPress. MediaTemple offers its customers a service entitled 1-Click Applications, which will install a WordPress site. Each hosting company listed will have their own unique interface and clear documentation for this service, but look for choices such as 1-Click Applications or Simple Scripts.

At this point of the installation we will be asked to name the database and provide a database table prefix. By default these are wp, but for security reasons it is recommended that the user should change the name to something unique. For the sample site, we will use something more descriptive to name the database and database prefix. Using descriptive names will prevent future confusion should we install more WordPress sites at a later date.

  • Database name: wpcourse

  • Database prefix: course_ (note that the database prefix is followed by an underscore)

Finishing the installation

To complete the installation, we will visit the WordPress Welcome page. To access this page, type http://example.org/wp-admin/install.php in your browser (remember to replace example.org with the name of your site).

From the Welcome page, we are able to enter the title of our site, create a username and password, enter our e-mail address, and choose if we would like our site to be available to search engines such as Google and Bing.

Note

Choosing a username

By default WordPress selects admin as the username. For security reasons, it is advisable to choose a unique name.

Once the information has been entered, click on the Install WordPress button to complete the installation process. We will then receive a success message and be given the option to log in to WordPress. WordPress is now installed and our site is live!

Manually installing WordPress

Some educators may be lucky enough to have access to institution running web hosting accounts. Speak with your IT department about this possibility and ensure that the servers meet the PHP and MySQL requirements needed to run WordPress. In this scenario, we may need to perform a manual installation of WordPress.

Before performing a manual WordPress installation, we will need two crucial pieces of software: an FTP program and a text editor.

FTP (File Transfer Protocol) programs allow us to transfer files from our computer to a web server. FileZilla (http://filezilla-project.org) is an open source FTP program that is available cross platform (Windows, Mac OS X, and Linux).

Text editors allow us to edit text files in a range of formats. When installing WordPress manually, we will use our text editor to make changes to the WordPress PHP files. If you do not already have a specialized text editor, both Windows and Mac OS X come pre-equipped with basic text editors (Notepad for Windows, Text Edit for Mac OS X, and Nano or gedit for Linux).

With our FTP program and text editor, we are ready to complete the Famous 5-minute install process.

  1. 1. Download WordPress: Visit WordPress.org, available through download, and unzip the latest version of the WordPress software.

  2. 2. Create a database: The most common means for creating a database is to use the tool phpMyAdmin. This is a web page that allows us to administer our MySQL databases. If phpMyAdmin is not already available, documentation and a download link are available through http://phpmyadmin.net.

    Note

    Institutionally managed accounts may not permit users to install phpMyAdmin, but may provide other means for creating databases. Speak with your IT administrators to gain a clear understanding of your institution's policies.

    • Within phpMyAdmin, create a database by clicking on the Databases tab, naming the database in the Create new database textbox and clicking on the Create button. In this example, I've called the database wpcourse.

    • Be sure to note the following information about your database:

      • The Database name is the name you have given the new database.

      • The Database username is the username you use to log in to the database.

      • The Database password is the password you use to log in to the database.

      • The Database host is the name given by the host. This is typically localhost.

        Of these, only the database name is generated by us. The remaining information should be supplied by the IT department or hosting provider.

        In this example installation, my database information is as follows:

      • Database name: wpcourse

      • Database username: administrator

      • Database password: xyz123

      • Database host: localhost

    Note

    The database host

    The majority of hosting companies use localhost as the database hostname, but it may vary depending on provider. The WordPress Codex provides a list of database hostnames for a number of popular hosting companies (http://codex.wordpress.org/Editing_wp-config.php). If you are working with the IT department at your institution, speak with them regarding the database host information.

  3. 3. Create a copy of the wp-config-sample.php and rename the file wp-config-sample-copy.php. This ensures that there is a backup of the initial wp-config file.

  4. 4. Rename the wp-config-sample.php file to wp-config.php. This file is located in the main directory of the downloaded WordPress folder.

  5. 5. Fill in your database details in the wp-config.php file. To do this, open wp-config.php with your text editor and locate the following:

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', 'putyourdbnamehere');
    
    /** MySQL database username */
    define('DB_USER', 'usernamehere');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'yourpasswordhere');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    

    To edit the file:

    • Replace putyourdbnamehere with your database name. In our example, this is wpcourse.

    • Replace usernamehere with your database username. In our example, this is administrator.

    • Replace yourpasswordhere with your database password. In our example, this is xyz123.

    • If necessary, replace localhost with your MySQL hostname.

      This information will now be changed to look something like this (be sure to use your own database information):

    // ** MySQL settings - You can get this info from your web host ** //
    /** The name of the database for WordPress */
    define('DB_NAME', wpcourse);
    
    /** MySQL database username */
    define('DB_USER', 'administrator');
    
    /** MySQL database password */
    define('DB_PASSWORD', 'xyz123');
    
    /** MySQL hostname */
    define('DB_HOST', 'localhost');
    
    
  6. 6. Update the WordPress security keys within the wp-config.php file. The security keys are a long, random collection of characters used to encrypt user information. To create the security keys visit https://api.wordpress.org/secret-key/1.1/salt/.

    This will create a set of random keys such as:

    define('AUTH_KEY', 'mJZ!HZUYS^EGrg~I5xJLCdnQ|xq?%56c;~@l7g5)Eb2n+I/zrv<cqBdFtjA^jp%/');
    define('SECURE_AUTH_KEY', 'NH#,QsmxIV 1ig~~{;|~T<i-x+_(`En>+Z?;@H+tg%/w/AbNb|]u9?HB>I*W8]>0');
    define('LOGGED_IN_KEY', 'CfC-VBrKNXYiR9d.V&Wj=IJ/P)_3fNgBq(- u9HW 2kD[KpX,.$n&K}|kvVa{}+l');
    define('NONCE_KEY', '%Vo8&Fq+fy78f4mJE`QoXcrW<Qw:|TvDu<f~Dtl]$Hr|h@:l,sC{CmJ/z,ZMv1g(');
    define('AUTH_SALT', '`+>ED885rL]r4TLU.P77m23.x$=<-@--<JEC>aKd0{{bM5VIc54]g*b6T[c>aUVM');
    define('SECURE_AUTH_SALT', 'm^{}c[1Fx/FT!3<5OP+_H^E0+p.W<rV|ADSxT =DMHkTaPnrdxY6R!bJbrzSoeJM');
    define('LOGGED_IN_SALT', 'WapX3 yi;iG<x-&T)}qEAF18_J#<%wSHjMS*6cWTp=I:WWb|N|}L_84KE4>muI6N');
    define('NONCE_SALT', '?a2b|4pawNj4.4YX;n9LZGxXW/|?zd@JJ(|AlO*@VdUna-*[$VQQ*6-_MF{olRcP');
    

    Add the security key to the wp-config.php file by copying it and replacing the default keys contained within the file.

  7. 7. Upload WordPress to the server. Using the credentials supplied by your IT department/web host, access your server through the FTP software and drag the entire contents of the WordPress directory to your server.

  8. 8. Run the installation. Run the WordPress installation script by going to http://example.org/wp-admin/install.php in your browser and filling in the appropriate information.

This covers the basic installation of WordPress. The WordPress Codex has a variety of instructions covering a range of hosting options and can serve as an excellent resource (http://codex.wordpress.org/Installing_WordPress).

You have been reading a chapter from
WordPress for Education
Published in: Jun 2012
Publisher: Packt
ISBN-13: 9781849518208
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image