Installing WordPress
While UW Technology does not support WordPress, a limited set of documentation is provided for advanced-level, do-it-yourself use.
Included on this page:Pre-Requisites
Using MySQL
WordPress requires MySQL, so if you don't already have it installed on your account, you'll have to install MySQL. You should also create an empty database for WordPress to use.
The link above explains how to install MySQL.Note: Please read about running servers on your own account before getting started with MySQL.
Before you install a PHP application on your account you should configure your
php.inifile. In order to do this you need to copy the file to your public_html directory and then edit any settings you need to change. You should at least edit theupload_tmp_dirsetting. Depending on the application and how you're using it, other settings might also be a good idea.
Installation
-
Log in to your Homer or Dante account with Tera Term or another terminal emulator.
-
Press the O key for Other, then press the W key to drop into the Web development environment (Ovid or Vergil).
-
Change directories to your public_html directory.
cd public_html
Download WordPress using wget.
wget http://wordpress.org/latest.tar.gz
Unzip the file you just downloaded:
tar -xzvf latest.tar.gz
WordPress has a configuration script that will allow you to configure it to connect to your database via the web. We'll use that.
Open your favorite browser and go to http://accountType.washington.edu/UWNetID/wordpress/wp-admin/setup-config.php.
Replace accountType with staff, faculty, depts, courses, or students. Use whichever of these you normally use to view your website. Replace UWNetID with your UW NetID.
Start the setup process by clicking on "let's go!".
Enter the database connection details. You should know these if you just set up MySQL.
Database Name: wordpress (or whatever you named the database you created) User Name: Use a username you have created in MySQL with access to the wordpress database. Password: The password for the MySQL user mentioned above. Database Host: webdev host.u.washington.edu:port# Table Prefix: (leave this empty) The "Database Host" field is the most confusing one here. You'll need to enter the hostname of either ovid or vergil, depending on where your MySQL server is running. The port# will be the port number that you started MySQL on. This is located in your .my.cnf file if you don't remember.
Continue the installation by clicking on "run the install!".
Click on "First Step". Enter a title and your email address, and continue.
Now log on to WordPress with the random password given to you and change the admin password to something you can remember.
You're all set up. You can delete the latest.tar file you originally downloaded. Now write a blog entry.
Authentication Setups
There's a plugin for WordPress that will allow you to use UWNetID authentication to log in to your blog. This means that you if you've logged into WebPine or MyUW or other UW websites during this session, you'll already be logged into your blog. That's pretty handy.
HTTP Authentication 2.0 Plugin
UWNetID Required for Posting
This setup will require you to log in with your UWNetID in order to post entries, edit the configuration or other administrative tasks.
On the command line, go to the plugins directory of your WordPress install. This is located at wordpress/wp-content/plugins. If your WordPress directory is called "wordpress", you can use this command:
cd ~/public_html/wordpress/wp-content/plugins
Download the plugin using wget.
wget http://washington.edu/computing/web/publishing/http-authentication.php
Log into WordPress as the administrator.
In order to get the blog to load things properly when you turn authentication on in the .htaccess file, you'll need to make WordPress use SSL for the admin pages. You can get to this setting by clicking on "Options."
The option "WordPress address (URI)" will need to be changed to begin with "https" rather than "http."
Create a WordPress user with the same username as your UWNetID. This will be the user that you normally log in as, so you might want to consider giving the user administrator privileges. Note that when you create users in Wordpress, the Nickname field is used for their username.
In order to protect all of your administrative functions you'll have to enable UWNetID authentication for wp-login.php, xmlrpc.php and the wp-admin directory.
You can do this by adding two .htaccess files.
In the WordPress directory, add the following .htaccess file:
<Files wp-login.php> AuthType UWNetID require user yourUWNetID </Files> <Files xmlrpc.php> AuthType UWNetID require user yourUWNetID </Files>
In the wp-admin directory, add the following .htaccess file:
AuthType UWNetID
require user yourUWNetIDYou should replace yourUWNetID with the list of UW NetIDs that you want to be able to post to your wiki. You will also need to create accounts for these users in WordPress.
Hopefully you're still logged in as the administrator account. Go to the Plugins screen and activate "HTTP Authentication."
- You're done. Verify that everything's working by posting to your site.
UWNetID Required for Comments and Posting
Before you read this part, go through the instructions UWNetID Required for Posting. Most of the work for this setup will already have been done when you get through that one.
Log into WordPress as the administrator.
Go to "Options." Check the box labeled "Users must be registered and logged in to comment."
This is an important decision point in this setup. You need to decide whether you want to allow people to register theymselves or if you will create all the user accounts. You can turn on the "Anyone can register" option, and it will work, but the stylesheet for the registration page will not load properly because of the .htaccess file in the wp-admin directory.
Add the following section to the .htaccess file in your WordPress directory.
<Files wp-comments-post.php> AuthType UWNetID require valid-user </Files>
You're done. Open your website and post a comment to test your setup.
UWNetID Protected Blog
This is the most strongly protected setup in which users will have to log in with their UW NetID in order to even read your blog.
There are two options you'll have to update in order to get the blog to load things properly when you turn authentication on in the .htaccess file. You can get to these settings by clicking on "Options."
The options "WordPress address (URI)" and "Blog address (URI)" will both need to be changed to begin with "https" rather than "http."
Create a WordPress user with the same name as your UWNetID. This will be the user you normally log in as, so you might want to consider giving the user administrator privileges.
In order to get the plugin working you'll have to enable UWNetID authentication for your WordPress directory.
You can do this by following the instructions for Authorizing Any Valid UW NetID.
Assuming you want anyone with a UWNetID to be able to read your blog, you can use this .htaccess file in your WordPress directory:
AuthType UWNetID require valid-user
Hopefully you're still logged in as the administrator account. Go to the Plugins screen and activate "HTTP Authentication."
That should do it. Contact help@u.washington.edu if you have any problems.
