Quantcast
Channel: Twisted Thoughts
Viewing all articles
Browse latest Browse all 2

WordPress Installation on Ubuntu 11.04

$
0
0

This is the second and the last in the series of tutorials, on how to install WordPress on your Ubuntu 11.04 desktop. In the last tutorial we learnt how to install a LAMP server. Now we are going to use this LAMP server to install and run the WordPress. But before that I need to clarify few things regarding WordPress.com and WordPress.org.

Difference Between WordPress.Com and WordPress.Org
Wordpress.Com is a weblog hosting provider owned by a firm named Automattic, it is powered by WordPress.org (or just WordPress) and is supportted financially by paid upgrades, some high end services and Google Adsense advertising. Its basically like having an email account, you need to sign up for a free account and you can give your blog a name which will be hosted with the URL http://yoursitename.wordpess.com. With that done you can start writing posts, creating pages and so on. More on this can be seen in the video posted in one of my previous posts here. So basically if you are using WordPress.com you are free of hassles and all you need to concentrate is on your writing and rest all the admin type activities will be handled by WordPress.com, hence, WordPress.com becomes the master of your Universe and it has the power 😛 .
Coming to WordPress.org(I’ll refer to this as just WordPress), this is the FOSS that WordPress.com uses. WordPress is a blogging tool and a publishing platform powered by PHP and MySQL. So just like any other software you need to install this and do the maintenance/admin tasks. This enables you to get full access of the immensely power that WordPress has. So when it comes to Wordpess, you and only you are the master of your Universe and its you who has the POWER!! :P.

Ideally you do not want to install WordPress on your desktop, because it’ll be useless unless you make it act like a server. So you need to purchase a domain and install there, many of the web hosting companies like Speedhost.in/Gator etc. will even do a WordPress installation for little extra charge for their users if they require it. As you’ll see in the coming sections that its not tough to install this beautiful software.

WordPress Installation (Also called Famous Five Minute Install) – Will be telling you the desktop installation, for installing on the server, the steps are similar but you can view this for more details
1. Download and Extract: Download the latest version of WordPress from here, extract and place it where you want it in your desktop.
2. Database Tasks: After this we have to create a database where WordPress will put the tables and create a user that will have all the privileges on the database. If you are on your Hosting server and have cPanel or phpMyAdmin you can do this very easily using the Wizards they have. For the case of MySQL client you can execute some very simple SQL statements that do this work. Login as root and execute these one after the other

mysql > CREATE DATABASE database;
mysql > GRANT ALL PRIVILEGES ON database.* TO "username"@"host"
-> IDENTIFIED BY "password";
mysql > FLUSH PRIVILEGES;
mysql > EXIT
Bye
$

You can put some nice names here like database can be wordpress or blog, you can give the username as anything like admin and hostname will be usually localhost (on desktop or on server).

Just read the cPanel way of performing the above task on WordPress.org site here are the steps
Click MySQL Database Wizard icon under the Databases section.
1. Create a Database enter the database name and click Next Step.
2. Create Database Users enter the database user name and the password. Make sure to use a strong password. Click Create User.
3. Add User to Database click the All Privileges checkbox and click Next Step.
4. Complete the task note the database name and user. Write down the values of hostname, username, databasename, and the password you chose. (Note that hostname will usually be localhost.)

  1. WP-Config: Now we need to configure this file. So first take a backup of this, and name the backed up file like wp-sample-config.php . Open the wp-config file in your favourite text editor and put the Database details like database name, user name, password and hostname(usually localhost) that we created in step 2 and and save it. When this is done we are ready to roll. In case of your server installation you need to copy the files and paste it in the directory you want to run. You need to use FTP for this. But if you are on your desktop let the extracted file be the place where you want the website to run. We’ll configure Apache to run the files in any desired location.
  2. As discussed in the previous tutorial, the default path that the  Apache server will be using for running the files is /var/www so how do we make the server run the WordPress extract sitting in my Home Folder? Just change some settings :) . Its simple, take your terminal and go the path /etc/apache2/sites-available/ You need to use $cd /etc/apache2/sites-available/. This path contains the files that can be modified to change the running location of Apache server. Lets make a copy of the default file present here. Execute the command $sudo cp default mysite. This creates the copy, now lets modify the file mysite we just created. Execute $gksudo gedit mysite, give your password and edit the file by replacing /var/www with the path where your wordpress extract is kept. In my case its kept at /home/anshuman/BLOG/wordpress/, hence I replace /var/www using this path. This replacement will effect just two lines which are
    DocumentRoot /var/www and <Directory /var/www/>
    Now we need to enable the configuration saved in mysite and disable the one given in default. For this execute the command, sudo a2dissite default && sudo a2ensite mysite staying in the path /etc/apache2/sites-available/. Restart the server with sudo /etc/init.d/apache2 restart
    After this your server is good to run the files in your desired path. This step is optional, you can always copy the directory in the /var/www path

  3. Now just go the following URL http://localhost/wp-admin/install.php and enter the details required and this will install WordPress on your machine or the server.

Well this ends the small tutorial on how to install WordPress in your machine. Please feel free to comment and give in your valuable inputs and queries. Happy Blogging! :)


Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images