Install wordpress in Ubuntu Linux
Monday, October 16, 2006 1:55:29 AM
I am here just to write down the steps for future reference. First of all, solves the dependencies, Apache, mysql and php must be install.
sudo apt-get install apache2 libapache2-mod-php5 php5 php5-mysql mysql-server
Secondly, download the wordpress and extract to /var/www, restart apache
sudo /etc/init.d/apache2 restart
Next, change the config-sample.php and save as config.php at the wordpress folder, important part to change shows as bellow:
<?php
// ** MySQL settings ** //
define('DB_NAME', 'dbname'); // The name of the database
define('DB_USER', 'mysqluser'); // Your MySQL username
define('DB_PASSWORD', 'mysqlpasswd'); // ...and password
define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value
Okay, next create a user and a database in mysql for your wordpress. By default root without password you can enter the mysql by the mysql command, and it will shows
mysql >
If your root have password? Just run this bellow
mysql -u root -p your_password
Okay create user,
mysql> GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'localhost'
-> IDENTIFIED BY 'mysqlpasswd' WITH GRANT OPTION;
mysql> GRANT ALL PRIVILEGES ON *.* TO 'mysqluser'@'%'
-> IDENTIFIED BY 'mysqlpasswd' WITH GRANT OPTION;
Usually first 2 line should be enough, another 2 lines enabled the database to be accessible remotely.
Next, type exit to logout and login with new username, for this example , username is mysqluser
mysql -u mysqluser -p
Specified -p without putting password at behind will trigger mysql to prompt you for passward, enter your password and now create the database for your wordpress.
mysql> create database dbname;
Okay last step, Open your browser, type URL and follow the simple instruction.
localhost/wp-folder/readme.html
Have Fun!













