WordPress
From Wiki99
↑ Computers ↑
← prev: Managing MySQL
next: Mediawiki →
Contents |
Installation of WordPress
Download
WordPress is remarkably easy to install. (These instructions are for version 2.0. As always, with a newer version scan through the instructions provided to make sure that nothing significant has changed.)
- The WordPress web site is http://wordpress.org.
- You can download the latest version from http://wordpress.org/latest.tar.gz.
- Installation information can be found at http://codex.wordpress.org/Installing_WordPress.
MySQL tasks
On MacOS X 10.4.4 the main setup we need to perform is, in MySQL, to create the appropriate userID for WordPress, to give that userID a password, and to create a database into which WordPress will store its information.
I assume that you have gone through the material on MySQL and so have installed it, and have modified it to allow old style passwords. We start off launching the command line interface to MySQL
Now create the WordPress database
Say that it is "owned" by userID wordpress with some password
(Note that you need the single quote marks around the password, and obviously you will set the password to whatever value you want.)
Set the password to be an old style password (again you need the quote marks).
SET PASSWORD FOR wordpress@localhost = OLD_PASSWORD('99merry');
Clean up and exit
FLUSH PRIVILEGES;
Changing the WordPress config file
We now have to tell the WordPress application how to connect to MySQL, what userID and password to connect with, and the name of the database to use. This information is stored in a file inside the WordPress folder. I assume you downloaded the WordPress application to your desktop; if not modify below as appropriate
cd ~/Destop/wordpress
cp wp-config-sample.php wp-config.php
pico wp-config.php
now
change DB_USER to wordpress
change DB_PASSWORD to 99merry
change ADDRESS to localhost:/opt/local/var/run/mysql5/mysqld.sock
The important changes here (ie the ones you are likely to need to make) are the three listed above. Chances are that the config file has the database to use set to wordpress, same as you created above. It is possible that your version of MySQL may have its socket created somewhere other than the location I give above --- another common place is /tmp/mysqld.sock, so make that change as appropriate.
Installation of the WordPress application into your Web server folder
Using Finder or the command line, move ~/Desktop/wordpress to /Library/WebServer/Documents/blog99 (changing blog99 to whatever name you want your blog to have in the URL) so
First login
Finally in your web browser type in
(changing blog99, of course, to whatever is appropriate). then in the form that comes up enter
blog name: blog99
address : blog99@yourHostName.org
The application will return to you
- a username (admin) for logging in as root,
- a pasword (created randomly) for logging in as root,
- a URL to type in (something like localhost/blog99/wp-login.php
Write these down for now. Later once you've used WordPress enough you'll probably have them memorized.
You're now set. You can start blogging right away, or can modify preferences as you see fit.
Customization
Users
Once you have logged in to WordPress for the very first time, you probably will want to perform a few customizations. In particular, you will probably want to click on the tab named Users and do something. Depending on your tastes, you may want to have only one user registered for the blog (namely admin) and nothing else. This, obviously, is easiest if you plan to be the only person ever posting.
On the other hand if you suspect that you may one day add other posters, you might want to prepare for that by creating a new account in your name, and leaving admin as a special account. It's your choice.
What you will see on clicking the Users tab is the one-and-only account, that for admin. You may want, at this point, to change the password, but beyond that what you change is up to you. Remember to click the Update button at the bottom of the page, here and always!
Next click on the Authors and Users sub-tab, scroll down to Add New User and fill in the settings as appropriate.
Options
Now click the Options tab, and in the dialog box that appears, you probably want to change the Tagline of your weblog to something different from the default
You can, of course, look through the other options, and it's up to you which of them you wish to utilized.
Links
Out of the box WordPress populates your blogroll with links to various people you've never heard of. You probably want to remove all these links right away. If you have blogs you'd like to recommend, you can add them now, or add them later as ideas come to you.
Other customization
It's very tempting when you first get things working to go overboard in customization, dicking around with themes, adding every interesting-looking plugin, and so on. If that sort of thing appeals to you, have fun, but remember that you don't have to do that; you can just get to posting right away if you want, and just accept the defaults as they are. After a few weeks of working with WordPress you'll probably have a much better idea of what things about the system you'd like to change, at which point customization probably makes more sense.
Markdown
The one customization I find immediately essential is to add Markdown to WordPress. By default WordPress expects you to edit your text using a wordprocessor model, not a text editor model. In particular, a carriage return is treated as starting a new paragraph, not as simply starting a new line. If you, like me, spend all your time in a text editor and loath the word processor model, you will want to do something about this. If you like the word processor model, ignore the rest of this section.
The easiest solution is to install Markdown which provides an alternative markup language to HTML that is well adapted to pure ASCII text editors. You can read about it in a few different places, but here is a simple introduction with here a full description.
To install this into WordPress, download the the PHP Markdown file from http://www.michelf.com/projects/php-markdown/ uncompress it to a file named markdown.php and move this to the WordPress plugins folder:
Next go to the WordPress plugins administration page using your web browser http://localhost/BlogName/wp-admin/plugins.php, and click the activate button next to Markdown.
Finally go to the Users page, scroll to the bottom of your personal preferences, and uncheck the checkbox that says "Use the visual rich editor when writing". You can now happily use Markdown syntax in your posts.
A note on browsers
While Safari is great for many many purposes, something about the HTML/javascript that is generated by WordPress (and MediaWiki) makes it feel very sluggish. You will probably prefer to write, edit and manipulate your content using an alternative browser, the obvious choices being either Camino or Firefox.
We can all hope that the next rev of Safari solves this issue, but for now, you should be aware of the problem. Note that your web pages will display fine in Safari (actually for most purposes they, IMHO, look quite a bit better in Safari than in Camino or Firefox), the problem is simply that editing using Safari is sluggish.

