How to Install WordPress in Ubuntu 14.10

0
1206


WordPress is a free open source blogging software and Content Management System(CMS) based on PHP and MySQL database. Managing wordpress blog or web site is very easy because of plugins (i.e for every requirement lots of WordPress Plugins are available)

In this post we will discuss how to install latest version of wordpress in Ubuntu 14.10 . Before starting wordpress installation , just make sure that you have installed LAMP(Linux, Apache, MySQL, PHP)

I am assuming Web Server (Apache2), PHP and MySQL server are not installed in your Ubuntu machine , if these are installed on your machine then you can skip their installation steps.

Installing Web Server (Apache2 )

Open the terminal , use below apt-get command.

$ sudo apt-get install apache2

After the installation , edit the file ‘/etc/apache2/sites-available/000-default.conf’ so that wordpress function correctly , add the below lines just before the </VirtualHost> entry.

$ sudo vi /etc/apache2/sites-available/000-default.conf

<Directory /var/www/html/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

Save & exit the file.

Installing MySQL Database Server

Open the Terminal , type the below apt-get command to install MySQL.

$ sudo apt-get install mysql-server mysql-client

During installation , you will be asked to set mysql root password , just enter the password & remember it.

After MySQL installation , we will create a database(wordpressdb) which will be used by wordpress during its installation.

nextstep4it@nextstep4it:~$ mysql -u root -p
Enter password:
mysql> CREATE DATABASE wordpressdb;
Query OK, 1 row affected (0.00 sec)

Create a database User (wpuser) using below command.

mysql> CREATE USER wpuser@localhost IDENTIFIED BY 'User-Password-Here';
Query OK, 0 rows affected (0.00 sec)

 

Grant all Permission to wpuser on wordpress database (wordpressdb) using below command :

mysql> GRANT ALL ON wordpressdb.* TO wpuser@localhost;
Query OK, 0 rows affected (0.01 sec)
mysql> FLUSH PRIVILEGES;
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye

Installing PHP & other required packages.

$ sudo apt-get install php5 php5-gd php5-ldap php5-xmlrpc php5-mcrypt php5-common php5-snmp php5-curl php5-mysql

Restarting Apache2 & MySQL Service

$ sudo /etc/init.d/apache2 restart
$ sudo /etc/init.d/mysql restart

Installation Steps of WordPress

Step:1 Download the latest version of WordPress using wget command .

$ sudo wget http://wordpress.org/latest.zip

 

Step:2 Unzip the file and Copy all the contents of wordpress folder to /var/ww/html

$ sudo unzip latest.zip
$ sudo cp -rf wordpress/* /var/www/html/

Step:3 Set the ownership of Apache2 on /var/www/html folder.

$ sudo chown -R www-data:www-data /var/www/html/

change the Permissions(755) on /var/ww/html folder

$ sudo chmod -R 755 /var/www/html/

 

Step:4 Copy the WordPress Sample Config file To WordPress config File

$ sudo cp /var/www/html/wp-config-sample.php /var/www/html/wp-config.php

Edit the config file (wp-config.php) and update the database connection settings

$ sudo vi /var/www/html/wp-config.php

/** The name of the database for WordPress */
define('DB_NAME', 'wordpressdb');

/** MySQL database username */
define('DB_USER', 'wpuser');

/** MySQL database password */
define('DB_PASSWORD', 'wpuser-password');

/** MySQL hostname */
define('DB_HOST', 'localhost');

Save & Exit the file and Restart the apache2 service

$ sudo /etc/init.d/apache2 restart

 

Step:5 Now start the Web WordPress Installation , In the browser type http://<Server’s IP Address>/wp-admin/install.php

In My Case : http://192.168.1.20/wp-admin/install.php

wordpress-install-language

Select your respective Language & Click on Continue…

Enter the required information and click on ‘Install WordPress’ as shown below

wordpress-web-installation

A Success Message will come after WordPress Installation as shown below :

wordpress-success-message

Click on ‘Log In

Enter the WordPress Admin Credentials that we have set in earlier steps.

wordpress-admin-portal

WordPress Admin Dashboard after Entering Credentials.

wordpress-admin-dashboard

Installation of WordPress is complted now , enjoy and have fun 🙂

SHARE

LEAVE A REPLY