How To Setup And Use Memcached With WordPress

A few days ago, I spoke about the architecture that powers Techie Buzz. In that post, I had mentioned that memcached was one of our key ingredients.

Memcache is a powerful tool to share objects across servers and it is used by several big sites including , Yahoo and many more. The best part about using memcached on your server is that you can cut down on your database queries significantly and store commonly used objects in memory and share it across multiple servers.

If you use WordPress on a multi-server setup, you can easily cut down on DB queries by up-to 50% by implementing memcached. If you are interested in knowing how to implement memcached on your server, here is a tutorial. The assumption is that you are using Ubuntu, if not, the installation steps might change.

How To Install Memcached And Configure It

Step 1: Install memcached using the command given below

sudo apt-get install memcached

Step 2: After you have installed memcached you will have to configure it through a .conf file, to do that use the command given below

vi /etc/memcached.conf

Step 3: In the configuration file you will find few parameters, you can ignore the -d, -u and logfile parameters and leave it as default. However, change the -m, -p and -i parameters to suit your servers. The -m parameter specifies the memory that will be allocated to memcache. The -p parameter specifies the port that memcached will run on and the -l (ell) parameter specifies the IP address the memcached server will run on. You will need to change the -l (ell) parameter value from 127.0.0.1 to a local or global IP address of your server. This is necessary because your memcached server will be accessed by outside servers and using 127.0.0.1 will not work then.

Once you have done that run the following command.

service memcached restart or /etc/init.d/memcached restart

Using Memcached With WordPress

Once you have setup your memcached server, it is time to now setup WordPress to use memcached to store your objects. To do that, head over to http://wordpress.org/extend/plugins/memcached/ and install the memcached plugin for WordPress. Unlike other plugins, you will have to drop this file into the wp-content directory and not the plugins directory.

You will have to install additional plugins for your server to make use of this plugin, namely PECL memcache extension which can be downloaded from http://pecl.php.net/package/memcache.

Now comes the part where you will actually tell WordPress to use memcached as an object storing mechanism. To do that, open the wp-config file and add the line below to it.

global $memcached_servers;
$memcached_servers = array(‘default’ => array(‘memcache-server-ip-or-name:11211′));

The array is used to define multiple memcached servers which can be used for your site. Please make sure to edit the name/ip of the server and the port before you save the file.

That’s it. Now just refresh your cache and WordPress should start storing the objects in memcache and will access your database very sparsely.  Do let me know if you have any problems or difficulties in setting this up through your comments.

Bonus Note: You can browse and manage your memcache server through a WordPress plugin called WP Memcached Manager which can be downloaded at http://wordpress.org/extend/plugins/wp-memcached-manager/.

How To Use Ubuntu Font On Your Website or Webpage

The Ubuntu font was released last year in August to everyone and it was definitely one of the best looking fonts I have come across. I also use the Ubuntu font extensively on my PC thanks to this handy trick to install Ubuntu font on Windows.

Use Ubuntu Font on Websites

As I was redesigning the website to give a fresher look to it, I wanted to make use of the Ubuntu font for it. Unfortunately, it is not a web font yet modern web browsers won’t understand it.

However, you can use the Ubuntu font for your website or any webpage on the internet thanks to Google Web Fonts. In , you can also change the font of any website using a called Google Font Directory.

Ubuntu Font for Websites

To implement the Ubuntu font on your website or webpage, head over to this page and click on the link which says "Use this font". On this page you will find code and instructions to use the Ubuntu font on your website. Just copy over the code to your webpage and you can specify your font as "Ubuntu"

Google Web Fonts also has several other fonts which can be used on any websites or webpages, head over to http://www.google.com/webfonts to browse the entire collection.

P.S. Don’t forget to tell me what you think of the new Techie Buzz design.

How To Open .db Files?

Recently one of my friends downloaded an app and found out that it contained a file with a .db extension. She did not know how to open the file and asked my help. Since I have dealt with .db files previously, I was able to quickly point out to her on how to open a .db file.

The .db file could also be a Windows thumbnail cache file which stores thumbnail images for Windows Explorer’s thumbnail view. The Windows thumbnail cache file will always have a name called thumbs.db.

Additionally, .db files are database files created in popular lightweight database SQLite. The .db files can be created by several applications including , , and other apps to store information. To open files with .db extensions which are not named thumbs.db, you will need to download the SQLite Database Browser.

The SQLite Database Browser can be downloaded from http://sqlitebrowser.sourceforge.net/. Once you download and extract the software, double click on the executable name SQLite Database Browser. After that follow the steps given below.

Step 1: Click on File -> Open and select the .db file you want to open.

SQLite Open .db Files Database

Step 2: If the file is a proper SQLite Database, you will be able to view the database tables and structure in the SQLite Database Browser as shown above.

Sometimes when you open a .db file, you might see an error saying that the file is not a SQLite Database. In those cases, you can try and open the file in a text editor to view it’s contents. If you are running windows, you can also try to open the file with Microsoft Access. Remember that thumbs.db is not a database file and cannot be opened using the above software.

In future, you can use a software called OpenWith to Identify and open unknown file extensions.

In the past we have also covered several ways to open other unknown extensions like how to open RM file, how to open RMVB files, how to open ISO files, how to open Torrent files, how to open VOB files, how to open AMR files,how to open RAR files, how to open NFO files, how to open PLS files, how to open daa files, how to open DAT files, how to open WBMP files and many more how to open file tutorials.

How To Open/View .WBMP Files?

Every once in a while you may download files which may have extensions that you may never have heard of. In such cases, you might be shown a dialog by windows to use a web service to find the appropriate software to open or view the file.

One of our readers downloaded a WBMP file recently and was wondering how to open it. First of all, a file with WBMP extension uses an image format called  Wireless Application Protocol Bitmap Format. It is an optimized image used for mobile devices.

The WBMP file cannot be opened using regular image software or and requires a special viewing tool. In order to open or view the WBMP file, you can download a software called XnView. Once you have downloaded the software, you can easily open and view the WBMP file with it.

Download the XnView software from here to open or view WBMP file. In future, you can use a software called OpenWith to Identify and open unknown file extensions.

In the past we have also covered several ways to open other unknown extensions like how to open RM file, how to open RMVB files, how to open ISO files, how to open Torrent files, how to open VOB files, how to open AMR files, how to open RAR files, how to open NFO files, how to open PLS files, how to open daa files, how to open DAT files and many more how to open file tutorials.

Do take a look at them or bookmark the pages for future reference.

Disable Gmail From Automatically Adding Contacts You Email

is no doubt one of the best email services out there, however, it does have an annoying feature which keeps adding email addresses as contacts when you email someone new. This can be quite a pain because your contact list will start growing with unnecessary contacts.

Gmail Love

Google has been listening to feedback and has introduced a new feature where users can disable Gmail from adding new users you email to your contacts list.

Gmail Auto Contacts

To enable this feature, head over to the Gmail settings page and look for the option which says “Create contacts for auto-complete”. Now select the option which says “I’ll add contacts myself” and save the settings. Once you have enabled this feature Gmail will not add new contacts to your contacts list unless you do it manually.

Ultimate List Of Firefox 4 Tips; Tricks And Hacks You Should Learn Right Now

is definitely one of the best versions of Firefox I have seen over the last couple of years. Firefox is one of the browsers I use since it was launched, but there were a few features and annoyances which needed to be fixed. Some of these were high memory hogging, no easy sync of bookmarks, passwords or browser preferences, no feel of a modern browser, unnecessary UI clutter and so on.

Firefox 4 Tips and Tricks

Thankfully, the Mozilla team has learned that this is the age of cloud computing and have introduced some rich features in Firefox 4. This includes Firefox Sync, Site tagging, Instant search, smart folders, tab groups and more.

Last time we tipped you with a comprehensive list of Internet Explorer 9 tips and tricks. Now here is another featuring Firefox 4 tips, tricks, hacks and more which will help you get a better and flawless Firefox experience.

Download, Installation And Getting Started With Firefox 4

Download Firefox 4

If you haven’t tried the newer Firefox 4 yet, we suggest you download Firefox 4 final version or try the RC download here (our review of Firefox 4). Yesterday, along with the final version of Firefox 4, Mozilla also released the RC version of Firefox for Android and Maemo on the Android Market.

Prerequisites For Installing Firefox 4

It’s always a good idea to first check your system requirements and the prerequisites of a software program before installing it on your operating system. This system requirements page at Mozilla details all the software and hardware requirements required for Firefox 4 to run on Windows, Mac or Linux.

Firefox 4 Installation Guide And Screenshot Tour

If you’re no geek and need step by step instructions for installing Firefox 4 on your computer, the screenshot tour by Howtogeek should be a good start.

How to Install Firefox 4 in Ubuntu Linux

Earlier today, we reported that Firefox 4 has just been released. Why do you need instructions to install the newest Firefox in Ubuntu? If you go into your Ubuntu Software Center, you’ll see that you more than likely have Firefox 3.6 installed, and it’s “up to date”. Naturally, they don’t add programs to the Software Center as soon as they are released. That would be foolish if there was something wrong with the new version. I don’t blame them for waiting at least a few days for the adventure seekers to provide some feedback.

There are three ways that I know of to add the newest Firefox to Ubuntu.

firefox 4 Continue reading How to Install Firefox 4 in Ubuntu Linux

Get Back Old Facebook Comment Button – Fix Enter to Comment On Facebook

recently rolled out a new change to their user interface where they got rid of the Comment button and allowed users to comment by hitting the Enter key. However, this was a bit annoying to users who did not know about it and innocently hit enter to add a new line to their comment. When they did this, the comment was automatically posted. (Hint: use Shift + Enter to add a new line)

Facebook Comment Button

If you are someone who has been annoyed by this problem, there is a quick and easy fix to get back the old comment button on Facebook through a script.

To get the old comment button back in Facebook, head over to http://www.crypticide.com/alecm/chrome/ and click on the FixSillyFacebook.user.js to install the Greasemonkey script in and (you will need the Greasemonkey add-on). If you are using or Internet Explorer or Safari follow our earlier post on Installing Greasemonkey scripts in Opera, IE and Safari.

P.S. The above script was a modification of another script created by Daniel Wood because it lacked the ability to work on the www subdomain in Facebook.

Post Meta Values Automatically Deleted in WordPress?

I use a lot of custom meta fields in WordPress posts for several reasons. They allow me to manipulate multiple posts without having to write code for a specific conditions.

WordPress Logo

However, of late, I came across a very annoying problem where custom meta fields were automatically deleted for some reason that was unknown to me. It was annoying me to no end because I had to manually go in and add those custom fields for the posts over and over again.

I didn’t have much time to figure out what is wrong and left in some debug code which would allow me to later on see how things were disappearing. Today, I checked those logs and found out the problem with the disappearing custom meta fields.

The problem was that, WordPress processes hooks for the edit_post, publish_post and save_post not just for editing the posts but also various other functions like while approving comments too, but the code in question always tried to find the $_POST variables and delete them if they didn’t exist. This was the mystery behind those disappearing post custom meta fields.

Solution For The Problem?

If you are not a developer, you are better off disabling those plugins and adding those fields manually using WordPress write interface. However, if you use a plugin you might lose additional functionality it provides. You could always send an email to the plugin developer asking them to make the appropriate changes.

If you are a developer, Mark Jaquith has a post which talks about avoiding such problems. You can read the post here and modify your plugin or theme to fix this issue.

Enable Firefox’s Open Existing Tab Feature in Google Chrome

has a lot of new features (Read Firefox 4 Beta Review | Read Firefox 4 RC Review) which are pretty good. One of the feature which improves tab management in 4 is the ability to switch to open tabs from the Awesome bar.

chrome_focus_open_tab

This feature allows you to type a URL or title of the page and jump to an open tab instead of opening a new tab. does not have this feature in the current stable version. However, if you are using the development version of Google Chrome or Canary Build of Chrome, you can enable this feature in the browser.

To enable the Open Existing Tab feature in development or Canary build version of Chrome, open a new tab and type about:flags and hit Enter. Now scroll down to the bottom of the page and Enable the feature Focus existing tab on open.

Once you have enabled this feature, Chrome will take you to an existing open tab instead of opening a new tab. This is definitely handy when you have several tabs open and don’t want to search for the tab you are looking for or open another unnecessary tab. Kudos to Mozilla for thinking of this feature.