To install wordpress in ubuntu, you must have installed LAMP. LAMP stands for Linux OS, Apache web server, MySQL Database and last but not least PHP.
Open your terminal first and update the systems by typing:
$ sudo apt-get update
After typing that command, hit enter.Since we are using sudo command, you will be asked for your password.
Now we will install apache first, hence type:
$ sudo apt-get install apache2
The second thing to install is MySQL. Type the following command:
sudo apt-get install mysql-server
Hit enter after typing the command. You will be asked for MySQL password that you will be using.
The third step is installing PHP
$ sudo apt-get install php libapache2-mod-php php-mcrypt php-mysql