WordPress installation

Below are the basic steps required  to prepare your server for WordPress platform (Installations are based on Ubunto OS)

1) Install WordPress from command line

# sudo -i (as a root user)

#apt-get install wordpress

Default installation files are placed in /usr/share/wordpress/ directory.

[Alternative : we can download the .tar file http://wordpress.org/latest.tar.gz from WordPress website and extract it in any directory]

2) Create shortcut of /usr/share/wordpress/ in /var/www/ directory (Default apache  document root)

# ln -s /usr/share/wordpress/ /var/www/wordpress/

3) Creating Database and database user.

#mysql -u root -p [password]
mysql> CREATE DATABASE wordpress;
mysql> CREATE USER
wordpressuser;
mysql> SET PASSWORD FOR
wordpressuser = PASSWORD(”wordpresspassword“);
mysql> GRANT ALL PRIVILEGES ON
wordpress.* TO “wordpressuser“@”localhost” IDENTIFIED BY “wordpresspassword“;
mysql> FLUSH PRIVILEGES
mysql> EXIT

[Alternative : You can install phpMyAdmin and create database and database users]

4) WordPress Configuration

WordPress configuration files is placed in /usr/share/wordpress/ with the sample as wp-config-sample.php

We have to edit this file according to our information of database name, user and password and save it as wp-config.php

# vi /usr/share/wordpress/wp-config-sample

// ** MySQL settings - You can get this info from your web host ** //^M
/** The name of the database for WordPress */^M
define('DB_NAME', 'wordpress');^M
^M
/** MySQL database wordpressuser */^M
define('DB_USER', 'root');^M
^M
/** MySQL database password */^M
define('DB_PASSWORD', '[wordpresspassword]');^M
^M
/** MySQL hostname */^M
define('DB_HOST', 'localhost');^M
^M
/** Database Charset to use in creating database tables. */^M
define('DB_CHARSET', 'utf8');^M
^M
/** The Database Collate type. Don't change this if in doubt. */^M
define('DB_COLLATE', '');^M
 

Save this file and rename it

# mv /usr/share/wordpress/wp-config-sample.php  /usr/share/wordpress/wp-config.php

5) Finalizing

Your basic configuration is completed.

Browse http://localhost/wordpress for WordPress Admin Login, Make sure your apache2 is installed and service is running.

Further configuration can be completed  using WordPress interface.

Advertisements