22
Jan

Tutorial: Setup a Totally Free, Self-Hosted WordPress.org Blog

This tutorial is intended to help guide new web masters (like myself) in getting their own totally free, self-hosted WordPress.org blog up and running. I’m using Fedora 8 to accomplish this, but your distribution of Linux is probably very similar. In fact, a great guide for Ubuntu is located here on their wiki. I try to write my tutorials so that anybody with any distribution can accomplish the task. It may not be identical, but the principles are usually the same. By the way, the setup instructions for Fedora 8 are located in the directory usr/share/doc/wordpress.2.3.2 after installing the wordpress package.

Let’s get started.

First, it’s important that you’ve already gotten a self-hosted webserver up and running. I have written a guide on how to accomplish this here:

http://derekhildreth.com/blog/tutorial-setup-your-own-self-hosted-simple-web-server-for-free

Now, if you have a webserver up and running, we’ll get down to the fun stuff.
1.) Install all of the required software for WordPress.org:
sudo yum install mysql-server mysql-administrator mysql mysql-gui-common php-mysql wordpress

2.) Setup the mySQL Server:
First, setup a password for the root account:
mysqladmin -u root password 'passwordyouwant'

Login to mySQL
mysql -u root -p

Create the new WordPress database:
create database wordpress;

Create new user and password for database:
grant all privileges on wordpress.* to username identified by 'password';

Flush the privileges:
flush privileges;

Test the mySQL Setup:
exit
mysql -u username -p
enter password here
show databases;

The result should look similar to this:
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| test |
| wordpress |
+--------------------+
4 rows in set (0.29 sec)

3.) Configure the etc/wordpress/wp-config.php wordpress.org file:

Now that the mySQL WordPress database is setup, the WordPress config file must be updated. Open it either in your favorite text editor or your favorite php editor (like bluefish). If I were to choose gedit, the command to open it would be:
su -
gedit /etc/wordpress/wp-config.php

Highlighted in RED is what needs to be changed in order to reflect the new WordPress database:
// ** MySQL settings ** //
define('DB_NAME', 'wordpress'); // The name of the database
define('DB_USER', 'username'); // Your MySQL username
define('DB_PASSWORD', 'password'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

4.) Finish WordPress.org setup:

You’ll need to setup a symbolic link here to point your http server to the wordpress blog. Set this up by using this command:
ln -s /usr/share/wordpress/ /var/www/html/wordpress

Once the wp-config.php file has been updated and the database server and web server have been started,
open a web browser to http://localhost/wordpress/wp-admin/install.php and
follow the instructions given to you on the pages you see to set up the
database tables and begin publishing your blog.

(To start the database server and the web server, goto System->Administration->Services, then find and start the httpd service and the mysql service.)

5.) Setup the WordPress.org blog with your dyndns.org account (or domain):

Sign into your WordPress.org blog through http://localhost/wordpress/wp-admin and navigate to the “Options” link. There, you’ll see these two options: WordPress address (URL) and Blog address (URL). Delete the default address and put in your dyndns.org account address that connects your webserver. For example:

WordPress address (URL): http://mywebsite.dyndns.org/wordpress
Blog address (URL): http://mywebsite.dyndns.org/wordpress

The address depends on where you want you want your visitors to go. If your webserver’s single purpose is to host your WordPress blog, then you’ll probably want http://mywebsite.dyndns.org. If your webserver is doing other things and you want to separate them (like forums, blog, website) then you’ll want to use http://mywebsite.dyndns.org/wordpress. For example, I have had my WordPress.org blog located at http://sendderek.dyndns.org/wordpress.

Optional: Give WordPress.org access to the content directory:
As stated, this step is optional, but if you want to be able to load new themes or plugins, WordPress will have to have access to this folder. Otherwise, you’ll get an error stating something similar to “WordPress does not have access to the wp-content folder”.
cd /usr/share/wordpress/
su -
chmod 777 wp-content/

Sources: Fedora Forums (by firewing1)

Feel free to donate if this post prevented any headaches! Another way to show your appreciation is to take a gander at these relative ads that you may be interested in:


There's 4 Comments So Far

Who Linked To This Post?

  1. Tutorial: Setup Your Own (Self-Hosted) Simple Web Server for Free « SendDerek’s Blog
  2. Where can I find a good free resource on self hosted WP blogs? - Internet Marketing Forum