How to add another WordPress Blog

1 About this document

Purpose
This document out lines how to create a new WordPress blog on a server that already contains one WordPress Blog.
Audience
Systems Administrators
Requirements
Linux server running WordPress
Root access to server
This version date
07/27/0910:13:01 AM

2 Creating a new Database

Each WordPress Blog requires its own database.

  1. Log into MySQL
    mysql -u rootuser -p
  2. Create new database
    CREATE DATABASE cairss_wordpress;
  3. Grant Privileges
    GRANT ALL PRIVILEGES ON cairss_wordpress.* TO caulcairss@localhost IDENTIFIED BY password;
  4. Flush Privileges
    FLUSH PRIVILEGES;
  5. Exit
    EXIT

3 Downloading the software

  1. Change directories to where you will be serving the blog
    cd /var/www/myproject/blog
  2. Download the tar file
    wget http://wordpress.org/latest.tar.gz
  3. Extract the file
    tar -zxvf latest.tar.gz
  4. Change into directory that was created during extracting the tar.gz
    cd latest

4 Configuring WordPress

  1. Create a new wp-config.php file
    cp wp-config-sample.php wp-config.php
  2. Open the wp-config.php for editing
    vim wp-config.php
  3. Set database name, username and password using values from when you created the database in step 2
  4. Create a set of keys to be placed in the wp-config.php. Go to https://api.wordpress.org/secret-key/1.1/ it will create the exact code that you need to insert into your wp.config.php file. Use cut and Paste to insert it.

5 Configuring Apache

  1. Create an alias as per the following example
  2. Alias URLPath space FilePath
     Alias /blog /var/www/cairss/blog/wordpress
  3. Add index.php to DirectoryIndex directive in the httpd.conf
    DirectoryIndex index.html index.php

6 Restart Apache

  1. Check configuration
    /etc/init.d/httpd configtest
  2. Restart Apache
    /etc/init.d/httpd restart

or

/etc/init.d/httpd reload
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s