Installing WordPress on 4.0-Mona

From The Uniform Server Wiki
Revision as of 09:00, 15 February 2009 by Ric (talk | contribs) (New page: <span id="top"></span> {| cellpadding="2" |__TOC__||'''Installing WordPress on 4.0-Mona''' |} '''Introduction''' The following instructions show you how to install WordPress on a clean ve...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Installing WordPress on 4.0-Mona

Introduction

The following instructions show you how to install WordPress on a clean version of 4.0-Mona.

WordPress is easy to install on Uniform Server 4.0-Mona, do you need a portable version, no problem. New to blogging and want to get a feel for it in your own time and not be embarrassed by making mistakes on-line. Then this page is probably what you are looking for.

It shows you how to install WordPress on UniServer allowing you to explore WordPress’s features, test plugins and widgets.

Pre-Installation 1

Install Uniform server

  1. A) Create a new folder named wordpress_b (Can be any name)
  2. Extract a new copy of Uniform Server V4.0-Mona to this folder
    Note: You will need a database user name and password in this tutorial I use the Uniform defaults name=root password=root.
     --- Database user name root - No need to change this
     --- Database password root - Before installing WordPress I recommend changing this using apanel
  3. Start Uniform Server.

Download WordPress

  1. B) Create a new folder wordpress_a (Can be any name its only a temporary folder)
  2. Download WordPress 2.7 (or newer version) from here click on Download .ZIP and save to a convenient folder for example wordpress_a
  3. Extract this file to the current folder (right click on the file to be extracted wordpress-2.7.zip and select Extract All... click Next and Next again).
  4. This creates a new folder named: wordpress-2.7 (C) inside this folder is the main WordPress folder wordpress (D) containing all files required for installation.

Copy files to Uniform Server

  1. E) Copy folder wordpress and all its contents to Uniform Server's root folder *\UniServer\udrive\www

Top

Pre-Installation 2

Create a WordPress configuration file.

F) Inside the wordpress folder locate the file named: wp-config-sample.php Rename it to: wp-config.php

After renaming open file in a text editor (such as Notepad) locate the following three lines:

define('DB_NAME', 'putyourdbnamehere'); // The name of the database
define('DB_USER', 'usernamehere'); // Your MySQL username
define('DB_PASSWORD', 'yourpasswordhere'); // ...and password

Change the lines as shown in bold:

define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'root'); // Your MySQL username
define('DB_PASSWORD', 'root'); // ...and password

Save the file, this configuration file is used by WordPress to locate and access the database which we create in the next step.

Top

Installation - Create a WordPress Database

Creating the WordPress database is straight forward, tables are automatically inserted during installation

  1. Start Uniform Server (Double click on Server_Start.bat in folder UniServer).
  2. From apanel (displayed in your browser when the server starts) click on the phpMyAdmin link. (left menu under tools) Note you can always return to apanel by typing http://localhost/apanel/ into your browser address bar.
  3. A) We want to create a new database. Name it wordpress (or something easy to remember if you change this make sure you change the configuration file to match)
  4. B) Click on Create to create the database

Top

Installation

To start the WordPress installation process type http://localhost/wordpress/wp-admin/install.php into your browser and follow the instructions.

There are two pages to the process as follows:

1) Welcome page requires the following information:

  • Blog title: UniCenter Test -- (Choose whatever you like you can change this in WordPress)
  • Your e-mail: test@unicenter_test.com -- (Any email will do you can change this in WordPress)
  • Un-Check, "Allow my blog to appear in search engines ..." -- (Not required for testing)
  • Click on Install WordPress


2) Success page (I liked the final comment)

Note: username "admin" and password "a1f096". (the password is random make this the first thing you change in WordPress)

Top

Change your WordPress Password

Login to WordPress either using the link on the Success page or type type the following into your browser http://localhost/wordpress/wp-login.php

Use the username "admin" and password "see step 2 above"

Click on Users (top menu bar) select click on Your Profile, scroll down the page to Update Your Password and enter your new password twice. Click Update Profile (bottom right)

Note: The above is not necessary however it is niece to have a password you can remember!

Top

Accessing WordPress Information

Login to WordPress by typing the following into your browser: http://localhost/wordpress/wp-login.php
To view your Blog type the following into your browser: http://localhost/wordpress/

Top


Permalinks

There are three types of WordPress permalinks (permanent links):

  1. Default “Ugly” e.g. http://example.com/?page=Number
  2. Pretty Permalinks "uses mod_rewrite" e.g. http://example.com/year/month/day/post-name
  3. PATHINFO "include index.php" e.g http://example.com/index.php/yyyy/mm/dd/post-name/

The following example shows how to enable custom permalinks (Pretty Permalinks).

  1. Log into Wordpress select Dashboard > Settings > Permalinks
  2. Click Custom radio button and enter /%postname%/%post_id%/
    For a full list of variables check the WordPress Wiki
  3. Click Save Changes

Permalinks - Error message

When you view your WordPress site the following error message is displayed:

Forbidden
You don't have permission to access /wordpress/ on this server.

To resolve this issue enable mod_rewrite in Apache’s configuration file and allow WordPress to following symbolic links these are covered below:

Top

.htaccess

After clicking "Save Changes" Wordpress creates a new file in folder UniServer\udrive\www\wordpress named .htaccess

Open this file in a text editor it will look similar to this:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress

Add the following line: Options +FollowSymLinks so the file looks like this:

Options +FollowSymLinks
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress/index.php [L]
</IfModule>
# END WordPress

Note: If you change the custom variables all content between # BEGIN WordPress and # END WordPress markers are overwritten hence the reason for putting the line Options +FollowSymLinks outside of the WordPress block.

Top

httpd.conf

Edit Apache's configuration file:

UniServer\udrive\usr\local\apache2\conf\httpd.conf

Locate this line (194):

#LoadModule rewrite_module modules/mod_rewrite.so

Remove the hash "#" as shown:

LoadModule rewrite_module modules/mod_rewrite.so

Save the file and restart servers check the new link format works.

Top

Portability

If you want a portable version of WordPress copy the folder UniServer and all its content to your USB memory stick that’s it. Don’t expect fantastic speeds however it is usable.

Top

Conclusion

WordPress is extremely easy to install on UniServer, if you want to have a go at blogging give it a spin on your own PC. Need more information pop over to WordPress.org when you feel confident get a free blog on WordPress.com.

Top