[Productivity Hack] Using WordPress as more than a blog!

One of the best things WordPress does is make your information a li’l more organized, which ain’t a bad thing and WordPress doing it well isn’t surprising ’cause it’s a Content Management System (CMS).  Now with some creativity, and a few freely available plugins (or you creating your own plugins), you could use WordPress for a plethora of cool stuff. For example, recently I was looking for a code snippet organizer and this idea struck me – why not use WordPress for it? Some of the things that you can use WP for (from the top of my head) – Code Snippet Organizer, Personal Diary, Cookbook, Logs, Idea Diary, etc..

So if you’re totally new to all this and are wondering what WordPress means, continue reading, else if you know to deploy wordpress on your local machine, have fun with the tip above :)

Things you’ll need -

  • *AMP Server – That means – Apache, MySQL, PHP. If you’re on Ubuntu Linux you can get it with a simple sudo apt-get install tasksel && sudo tasksel install lamp-server  .For those on other distributions check with your distribution’s repository, for others – WAMP (Windows) , MAMP (MacOS), XAMPP (Windows)
  • phpMyAdmin
  • WordPress  -  I’ll be using WordPress 3.4.1 in this post.

Set up your *AMP server and phpMyAdmin. There are instructions on how to do that on those sites itself, so I won’t be repeating them. When that’s done, let’s head on to the WordPress deployment. Find out where the webroot  is according to your distribution. I am using Ubuntu 12.04 and installed both *AMP server using tasksel and phpMyAdmin using the repo so instructions following will be for the same. What we need to do is extract the contents of the WordPress zip/tar.gz file in our webroot.  Usually it’s at /var/www/

Create a directory and set the permissions such that others have the execute bit set. To know more about file permissions, read Understanding File Permissions.

$ cd /var/www/
$ sudo mkdir personal_diary
$ sudo chmod -R o+x personal_diary/

And extract the wordpress file you downloaded into that directory.

If you downloaded the ".tar.gz" version, do something like:
$ sudo tar -xvzf wordpress-3.4.1.tar.gz -C /var/www/personal_diary

If you downloaded the ".zip" version, do something like:
$ sudo unzip wordpress-3.4.1.zip -d /var/www/personal_diary

Now, you’ll notice that you have a directory called wordpress under the /var/www/personal_diary . Move the contents of the wordpress directory into personal_diary

$ sudo mv /var/www/personal_diary/wordpress/* /var/www/personal_diary/

Now open up your web-browser, Firefox, Google Chrome, Chromium, Opera, whichever you prefer and in the address bar go to http://localhost/personal_diary/readme.html and you can proceed with the installation of WordPress on your server from there. You need to go to http://localhost/personal_diary/wp-admin/install.php  .

wp_readme

Now would be a great time to create a database and a user for your WordPress installation in MySQL using phpMyAdmin. So, go over to your address bar and put in http://localhost/phpmyadmin/  and put in the login information you gave during the install.

phpmyadmin login page

And, then once you’re logged in, go over to the databases tab, and you’ll be able to create a new database. We’re gonna call the database personal_diary  in this example. Once that is done, click on the check privileges option beside the database that you just created.

phpmyadmin database creation
 phpmyadmin create priviliges click

 And now, you can add a new user to have all the privileges to this database. We are going to name the user too as personal_diary.  Make sure the host is localhost when creating this user as well, and ofcourse, you guessed it right, give the username a password! :P

phpmyadmin user creation

Now let’s get back to the WordPress installation, hopefully, you left that tab untouched when you jumped over to phpMyAdmin, if not no biggie, just navigate to http://localhost/personal_diary/wp-admin/install.php and do what needs to be done. Eventually, you’ll end up at a page that requests you for information regarding the database name, hostname and username/password for that database that you want your WordPress installation to use.

wordpress database info page

( Yeah, I know that’s a super-dumb password, but hey, it’s just a demo! Who cares? :P   )

So yeah, just click next and follow through with the instructions. You may get an error saying that wp-config.php could not be created due to permissions and all that, if so, create a wp-config.php file in the personal_diary directory along with the rest of the WordPress files and paste the content that it asks you to paste. And then follow along with the rest of the instructions, which are nothing but dead simple. You’ll arrive at your dashboard which looks something like this.

wp dashboard

The dashboard is your control panel of sorts. Just toy around and see what can be done. Now, your personal diary is all set, start writing and post something. You can visit your personal diary to read through it at http://localhost/personal_diary and you’ll need to login to get to your dashboard and you can do that at http://localhost/personal_diary/login.php 

personal diary site

 Now, that you’re comfortable with all this and are happily playing around, let’s get to another great feature of WordPress – it’s plugins. Most of the plugins are written by someone of the WordPress community and some really good ones are released for free. You can download these plugins (which come as .zip files) and unzip them in your WordPress installation’s wp-content/plugins/ directory.

Now our next example is going to be using WordPress as a Code Snippet Organizer. WordPress works really well for this ’cause everything can be categorized and tagged and stored away nicely to be referenced when required with ease. But using <code></code> tags for the code sections doesn’t fly well with me, coz some themes make the font really small and do some other weird stuff. So we’ll be using the syntax highlighter plugin. I have deployed a wordpress installation for this and the location is at /var/www/codesnippet/ , so that means to access the WordPress installation via the web-browser our address will be http://localhost/codesnippet/ .

Now let’s install the syntax highlighter plugin. Once the .zip file has been downloaded, extract it in the wp-content/plugins/ directory.

$ unzip syntaxhighlighter.zip -d /var/www/codesnippet/wp-content/plugins/

Now go over to the codesnippet’s dashboard using your web-browser and navigate to Plugins from the sidebar on the left-hand side. Just a reminder, your codesnippet dashboard will be at http://localhost/codesnippet/login.php . Once you are there, click on activate below the Syntax Highlighter plugin and it’ll get activated.

wp plugin page

 Now you can place code in your posts, make sure you put them in tags with the tag name as the language the code belongs to. For example, PHP code would go like this [php]…//code goes here…..[/php]. Now you can categorize them according to language or use or whatever you wish and now have your own Code Snippet Organizer :)

code snippet page

Neat huh? :)

There is also a privacy plugin called Private-only that you can use in tandem with your personal diary blog to make it truly personal from other users of your machine. It requires you login to view a WordPress site and thus increases your privacy :)

private only page

This article might have given you ideas as to how WordPress can serve you in other ways than just a blog or you might already have tweaked WordPress to serve your purpose as some other tool. So what have you? Share in the comment below :)

About these ads

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s