Easy WordPress Installation

by Mike on January 22, 2009 · 11 comments

in Web Server


One of the most popular programs for blogs and even content management is WordPress. What makes WordPress so popular is the ease of use, flexibility in set up and great support.  WordPress does an excellent job at providing documentation and options for everyday use.

There are now almost 4000 plugins available for WordPress.  Plugins give you the ability to add additional features that you want for your site.  There are almost 600 themes to make your WordPress stand out from others.  Another unique feature is that WordPress has an ideas section that has over 2000 ideas that people have proposed for WordPress helping it grow in the direction that people want.  All of this can be found at http://wordpress.org.

The one feature that helps WordPress stand out over other options that you have like Joomla for example, is that WordPress has done much more work on SEO, aiding your site in becoming more search engine friendly.

Here is a tutorial step-by-step in setting up a WordPress site on a Linux server.

WordPress requires several components to be able to work correctly.
1. Apache
2. PHP
3. MySQL

yum install httpd php mysql-server php-mysql

sudo apt-get install apache2 php php-mysql mysql-server

service httpd start
service mysqld start

sudo /etc/init.d/apache2 start
sudo /etc/init.d/mysqld start

Create Your Database
You will need create a database before you can set up WordPress.  Once your mysql server is running then you can login and configure it.  This login assumes you have already created a password for the root account, if not you can create a password for the root account on mysql with this:

mysqladmin -h localhost -u root password “my_password_here”

Now you can login with a password for the user root.  Note this mysql user is not the same root on the Linux system.

mysql -p -u root
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8891
Server version: 5.0.45 Source distribution

Type ‘help;’ or ‘\h’ for help. Type ‘\c’ to clear the buffer.

Now you can see the databases that are already created with this command:

mysql> show databases;
| Database           |
| information_schema |
| mysql              |
| test               |
| bu2            |
4 rows in set (0.00 sec)

If you wanted to create a new database for your WordPress then you would use the create command like this that will create a database with the name you provide:

mysql> create database effective;
Query OK, 1 row affected (0.00 sec)

mysql> quit

Here the database name was effective and was created by the root user who will then have access to that database.

Install WordPress
Copy WordPress to your base directory, usually /var/www/html or /var/www.  Now unzip the program.

unzip wordpress-2.7.zip

wordpress  wordpress-2.7.zip

Now you have a decision to make about how you want to use WordPress.  If you want to add a blod to an existing site move the directory name to blog:

mv wordpress blog

Then all the content would be located under your URL/blog.  However, if you want the content to be located in the base directory copy all of the files there.

cp -R wordpress/* /var/www/htdocs/web_site/

Be sure to change the permissions so that apache (CentOS) or www-data (Ubuntu) can read the files.

chown -R apache:apache *

sudo chown -R www-data:www-data *

Now you need to rename a file called wp-config-sample.php file to wp-config.php

mv wp-config-sample.php wp-config.php

Once that is done you will need to set the config file so it can find your database that you created.  Set the user(root), set the database name(effective or whatever you choose), and set the password for the user who has access(in this example the root password).

// ** MySQL settings – You can get this info from your web host ** //
/** The name of the database for WordPress */
define(‘DB_NAME’, ‘effective’);

/** MySQL database username */
define(‘DB_USER’, ‘root’);

/** MySQL database password */
define(‘DB_PASSWORD’, ‘ICRaSTi19*U6′);

/** MySQL hostname */
define(‘DB_HOST’, ‘localhost’);

/** Database Charset to use in creating database tables. */
define(‘DB_CHARSET’, ‘utf8′);

Now that that is done point your browser to the startup page to initialize the install.


Now you can follow the online questions and set up the site.  You will receive a unique password for your WordPress admin that you better write down because you will need it.


seo February 5, 2009 at 12:02 pm

Thanks ypou for tht man!

abud March 2, 2009 at 2:40 am

Nice blog broo

your article , very2 help me…


tip4pc May 23, 2009 at 9:47 pm

Great site to start learning Linux, Thanks, I’ve just follow you on Twitter, thanks for your knowledge about Linux ;)

web tasarım September 4, 2009 at 10:46 am

great article thank you.

web tasarım September 9, 2009 at 3:26 am

very good thank you

kurye September 24, 2009 at 1:27 pm

good informations thank you

moto kurye September 28, 2009 at 2:39 pm

thank you for share

koçluk December 29, 2009 at 1:54 am

thanks a lot sharing.

dell destek September 24, 2010 at 2:36 am

Information is very useful and helpful. Thanks for sharing.

{ 2 trackbacks }

Previous post:

Next post: