Categories
Tutorials Wordpress

How to configure W3 Total cache for best performance

Since the time Google announced that the Page Load time also plays an important role in ranking a web site, all of us are craving for a faster site load to get the SERP. But WordPress is notoriously famous for giving slow performance as it dynamically generates every posts and pages using database queries. Usage of various plugins for customization of a WordPress based site adds to this to make the site more slower. It does not mean that we will abandon WordPress and embrace another blogging platform. WordPress is the best blogging platform and have millions of good things to offer. There are various ways to make the WordPress based site faster.

Using a good performance optimization plugin is one of the best way to make your site faster. When we think of performance optimization plugin 2 things come to our mind e.g W3 Total cache and WP Super cache. For a week or so I have been testing both the plugins in various websites and in all my tests W3 total cache has far exceeded WP Super cache in all aspects. The Page speed and Yslow scores are higher in all my tests while using W3 total cache. Only problem with W3 total cache is that, it has huge customization option and if not done properly will result into a negative effect. Hence in this tutorial, I will take you through a step by step configuration of W3 Total cache.

Before you activate W3 Total cache, we suggest you to check the PageSpeed and Yslow score of your website using GTMetrix. Make a note of the scores and see the differences in score after you finish configuring the plugin.

Installing W3 Total Cache

First of all uninstall/deactivate any performance optimization (caching) plugins like WP Super cache. This is mandatory to avoid any conflict in further steps. When you are sure there is no caching plugin running, Download W3 Total Cache for free from WordPress Plugin repository and save it on the desktop. Unzip the archive and use your favorite ftp program to upload it to the wp-content/plugins folder of the website where you want to configure W3 total cache. Before we activate and proceed with the configuration, we will need to make the wp-content folder writable. So using the FTP client, change permission of wp-content folder to 777 till we are done with set up. Now go to WordPress Admin panel and click on plugins, look for W3 total cache in the list of inactive plugins and activate it. Upon activation a new menu item as shown in figure will appear in Admin panel.

This plugin has a nice notification system, which will issue notification messages whenever some action needs to be performed.

General Settings:

The first step in the configuration process is the general setting. Click on the General settings from the new Performance menu that appear. You will be presented with the General settings page.

The General settings is an overview of different features available in W3 total cache. This will show settings for Page Cache, Minify, Database Cache, Object Cache, Content Delivery Network (CDN) and Browser Cache. From here we can globally enable or disable a feature available in W3 Total Cache. By Default the W3 Total cache runs in preview mode. In that mode any changes we make in the plug-in will not be applicable to the live site. So our very fast job is to enable the plugin for the live site by disabling the Preview mode, hence the General settings page will look like this:

If you disable any of the features under general settings the option “Deselect this option to disable all caching functionality” will be automatically unchecked. So if you disable any feature and see that the option is unchecked, do not worry about it. It looks like a wrong reference. While testing various options I found that the Minify settings from W3 total cache can be disabled and we can use another plugin called Wp-Minify for the best minification. So my suggestion for General settings is

Page Cache:  Enable  and the method is Disk (enhanced)

Minify: Disable

Database cache: Enable and the method is Disk

Object cache: Enable and the method is Disk

Content Delivery Network: Enable and the CDN type depends upon what kind of CDN you use.

Browser Cache: Enable.

Once you are sure the general settings look like the above, we can proceed with the configuration of individual features.

Page Cache Setting:

Click on the drop down that reads general setting and select Page cache or click on Page cache from the Performance menu on Admin panel to access the Page cache setting. The Page cache feature of W3 total cache creates static html pages of WordPress posts and pages. So the pages are not generated dynamically every time they are requested. hence it reduce load considerably on the server and site loads faster. There are many option here, but we need not worry about all the features and leave them as per default setting. We just need to change the settings under General category. See the image below:

The settings page above shows that the Page cache feature is currently enabled. Make sure in your set up it reads the same. If you have followed the general setting instruction above, it will read enabled. However for you, if it says disabled, go back to general settings and Enable Page cache. It also gives the option to Empty cache, which will rebuild a new cache with your changes if you have made any.

The option Don’t cache pages for logged in users has been selected for the benefit of Admin who can see the changes in the live site without clearing the cache every time they make any changes. Homepage being the most viewed pages for many site we have selected to cache Home page.

We recommend to go with the default settings for options under Advanced, cache preload and Varnish.

Minify settings:

Minify is the process of compressing CSS, HTML and JavaScript by removing the comments and line break as well as zipping it and then combining the similar files together. So the size of those files will be reduced and loading will be faster. In our test with JS files minified and combined, we ran into some issues with the sites where in tabbers, lazy loading as well as some other functions which depends upon JavaScript did not work. So we disabled the Minify features in W3 Total Cache and used a separate plugin called Wp-Minify. With Wp-Minify we were able to combine and minify the js and css without affecting site features dependent on JavaScript. We also got better Page speed and Yslow result with Wp-minify.

So our recommendation is disable the Minify features in W3 Total cache.

Database Cache & Object Cache Settings:

This Database Cache feature helps in caching Database queries. So when a database query is made it goes through the cache.  If the query is not found in the cache then only actual query to DB will be made. In a WordPress based site what we see at the front end is a result of many database queries in the back-end. Options like Page views, number of comments etc are pulled up from database using queries. So caching these queries will reduce the load on the DB and we can significantly improve the performance.

We suggest not to make any changes in the settings for Database cache and Object Cache, just leave the default intact. If you are on a shared hosting environment, you may even consider disabling these 2 options. If the disk responds slower than the database, these caches don’t help. On the other hand, if the disk works fast, Database Cache and Object Cache can considerably speed up the site.

Browser cache:

When we access a website for the first time, the static files like css, JavaScript etc are downloaded onto our browser and stored in browser’s cache. Next time we access the same website those static files are accessed from the cache. The Browser Cache feature of W3 Total Cache helps in the setting of the behaviors of those cache-able files. It enables http compressions and specify expiration header for the files. The setting in browser cache helps the web browser to understand how to behave with the cache-able files. The browser cache settings will change the rule in .htaccess file. So if you are not sure about modifying the rules in .htaccess file, making changes through the browser settings is the best option. A correct setting here will definitely increase the PageSpeed as well as Yslow score.

By default Enable HTTP (gzip) compression and set W3 Total Cache header is enabled. We suggest you the following settings for browser cache:

Under General Setting Enable(check) the options Set expires header, Set cache control header, Set entity tag (eTag), Set W3 Total Cache header, Enable HTTP (gzip) compression and disable only the option Do not process 404 errors. Enable all the options under Cascading Style Sheets & JavaScript, HTML and Media & Other Files.

The final setting for browser Cache should look like this:

User Agent Group settings:

The user agent group setting has no impact in performance. This is always enabled and helps in redirecting user based upon the user agent of the browser to a different website theme or a different page or altogether a different domain. We can create a group of user agents and take specific action for the group. This option is useful to redirect mobile users to a mobile theme and normal computer users to a normal website theme.

Content Delivery Network Settings:

This is another very important feature of W3 Total Cache plugin. One limitation of web browsers is that simultaneously a browser can download 2 resources from a  domain. So while accessing a website the download able objects have to wait in a que to be downloaded to the browser, so the site load time increases. By using a Content Delivery Network we separate those objects from our primary domain as well as we offer the flexibility of those files being served from a  globally distributed network of the CDN service we use. Hence the site loads much faster. We can even use a sub domain like cdn.primarydomain.com and serve our static files from that sub domain to allow simultaneous download of files.

Currently we at Techie Zone use Speedy Mirror as our CDN provider. This offers 50GB of free bandwidth which is enough for a normal website with around 1000 visitors per day to sustain for 6 to 8 months. If you are looking for a free CDN provider, Speedy Mirror is the best among all. It requires minimal configuration and very easy to set up. The CDN settings we provide here is for speedy mirror. The setup procedure for speedy mirror is so easy that we do not feel like providing the steps here. You just need to register there and provide your domain name. It will provide you a sub domain URL like xxx.speedymirror.com. The static files automatically gets downloaded to their server.

For Speedy Mirror as your CDN provider, we need to Enable the CDN option and set mirror as the CDN type in General setting. Now in CDN settings page under configuration, put the sub domain name you obtained from Speedy Mirror (while setting up the account) for replace site’s host name with option and Auto for SSL support option. Click on Test mirror to test if this is working correctly.

Under general setting, we need to check the options Host wp-includes/ files, Host theme files and Host custom files. Leave the options under Advanced as default.

As we are done with all the settings now, you can check the site performance in GTMetrix and note the scores and compare that with your earlier score. You will surely have a smile on your face looking at those green values.

This concludes the tutorial for setting up the W3 Total Cache plugin. I have tried my best to provide the steps in as simple ways as possible. If you are stuck while setting up the plugin or need any help, you are always welcome to ask for help and we will be glad to help you.

If you need advanced support for setting up this plugin or improving your site speed, we can assist you for a small fee. You contact us and we will get back to you with details.

Categories
Tips & tricks Webmaster

Use robots.txt to prevent website from being ripped

We all want to prevent our websites from being ripped. If you have a unique design the desire to prevent it from being duplicated is more. So we need to have an effective way of preventing rippers from getting an exact replica of our website. There are a plethora of website ripping applications like WinHTTrack or Webreaper which have been surfacing now a days and the rippers use these applications to create website replicas. They can use the replicated dump to create an exact clone of your website.

These rippers use bots to crawl the target websites and create static html version of all pages, copy the images, style sheets, JavaScript etc (Can not copy PHP or ASP files) and save them on the hard drive maintaining the directory structure and hyperlinks. Once the complete website is downloaded to your PC, you can use the website offline even if you are not connected to the Internet. These downloaded data can also be used to make an exact replica of your website. For static html based website the cloning becomes much easier. None of the webmaster will ever wish to allow anyone to rip their website but most of them wonder how to prevent such an operations.

The image below shows how the usage of an effective robots.txt file in our website root prevented WinHTTrack to copy our content and data:

We can use the robots.txt file to prevent the website ripper bots to crawl our website and subsequently the program will not be able to copy anything. We know that bots access to a website can be controlled using robots.txt which sits in the website root directory. Whenever we use a ripping program the bot used by the program will have to pass the check in robots.txt. If it finds that there the rule in robots.txt that disallows the bot, it will no longer be able to crawl the site which is a win-win situation for us. In robots.txt we have either an allow or a disallow rule, which looks like this:

User-agent: <User Agent name>
Disallow: /

User-agent: <User Agent name>
Allow: /

In the above examples the / indicates the root directory. It can be replaced with the directory path to which we wish to allow or deny the access. So when a bot goes through robots.txt and find itself under the Deny rule it will stop there itself and can no longer enter into the website.

This robots.txt method can be used to prevent email harvester, leechers or any such evil spirited applications from accessing your site. We have compiled a commonly used evil programs and created the deny rule for those programs. You can use the list below in your robots.txt file to create a preventive shield from the evil programs like WinHTTrack or Email Collector or Web Downloader. If you do not have a robots.txt file in your website root, create one with the following content or if you have one, you can just copy paste the content in your existing robots.txt file.

# This list is compiled by Techie Zone part of Qlogix Network.
User-agent: Teleport
Disallow: /
User-agent: TeleportPro
Disallow: /
User-agent: EmailCollector
Disallow: /
User-agent: EmailSiphon
Disallow: /
User-agent: WebBandit
Disallow: /
User-agent: WebZIP
Disallow: /
User-agent: WebReaper
Disallow: /
User-agent: WebStripper
Disallow: /
User-agent: Web Downloader
Disallow: /
User-agent: WebCopier
Disallow: /
User-agent: Offline Explorer Pro
Disallow: /
User-agent: HTTrack Website Copier
Disallow: /
User-agent: Offline Commander
Disallow: /
User-agent: Leech
Disallow: /
User-agent: WebSnake
Disallow: /
User-agent: BlackWidow
Disallow: /
User-agent: HTTP Weazel
Disallow: /

As this post is targeted for Webmasters and you are reading this post indicates that you are one of them, we would also suggest you to read the post on Increasing your website speed.

Categories
Internet Tips & tricks

How to type in your native language

Are you wondering, how your friends send you scrap in Hindi/Oriya/Tamil or how they update their Facebook status message in Hindi/Oriya/Tamil. If you use Orkut (seen in some other Google application like blogger, Gmail) you would have seen that there is an option to type in your native Indian languages like Hindi/Bengali/Tamil etc. This is all possible because of a technology called Transliteration. There are various Transliteration provider, but the one provided by Google is very accurate and offers lot of fucntionalities. Transliteration converts the typed English characters into a native language based upon how it is spoken. It is not same as translation. So with the help of Transliteration tools you can phonetically type a word in English using a roman keyboard and it will be converted to the desired native language. So when you type Mera Bharat Mahaan, it will be converted to मेरा भारत महान.

Google Transliteration tools are available in different formats like Transliteration Bookmarklet, Transliteration IME and a dedicated website.

The Goolge Transliteration website is a dedicated website by Google which can be used to type in 24 supported language like Amharic, Arabic, Bengali, Chinese, Greek, Gujrati, Hebrew, Hindi, Japanese, Kannada, Malayalam, Marathi, Nepali, Oriya, Persian, Punjabi, Russian, Sanskrit, Serbian, Sinhalese, Tamil, Telugu, Tigrinya and Urdu. Using this website you can type whatever you want and then copy the transliterated version of the text and paste it wherever you wish. I selected Hindi from the drop down and typed my name in English using my normal keyboard and it got converted to अजय कुमार मेहेर.


Google Transliteration Bookmarklet is another way to use the transliteration service in any website with a text box to type. This bookmarklet is a simple piece of code which resides in the browser and provides you the option to chat, compose an email, update Facebook status or send scrap in your native language. Google Transliteration Bookmarklets are available in 19 different languages – Amharic, Arabic, Bengali, Greek, Gujarati, Hindi, Kannada, Malayalam, Marathi, Nepali, Persian, Punjabi, Russian, Sanskrit, Serbian, Tamil, Telugu, Tigrinya and Urdu. In order to use the Transliteration bookmarklet fature, you need to drag the appropriate bookmarklet to your browser’s bookmark toolbar.  For example to type in Hindi Drag the following bookmarklet to your Bookmark toolbar.

Type in Hindi

Transliteration IME offered by google is an Input Method Editor(IME) a very small program which allows to enter text in your native language using a standard Roman keyboard. Google Transliteration IME is available for 22 different languages – Amharic, Arabic, Bengali, Farsi, Greek, Gujarati, Hebrew, Hindi, Kannada, Malayalam, Marathi, Nepali, Oriya, Punjabi, Russian, Sanskrit, Serbian, Sinhalese, Tamil, Telugu, Tigrinya and Urdu. The Google IME provides the most advanced features and lot of customization. We ned to install a separate IME for each language. Once installed, it will show a status window at the bottom right corner of desktop. It has options to change language as well as settings option. This page provides further information about the Google transliteration IME.

Categories
Tutorials Windows

Best Ways To Deal With Errors Related To Malware Infection

Malware programs, such as virus, trojan, adware, spyware, and other variants are not only a grave security threat, but they also cause various errors by interfering with other running processes and corrupting the registry. Symptoms of malware infection include:

1. Frequent random application and system errors.
2. Sluggish computer performance.
3. Frequent system freeze ups.
4. Frequent software and system crashes.

If your Windows PC is showing any or all of the above symptoms, chances are that your PC is infected. Take action before it’s too late – a severely infected PC may stop functioning completely, a situation from where the only retreat is formatting Windows.

I am going to elaborate on couple of malicious processes that may be running in your PC and how to remove the malwares effectively.

Brief description of the three most harmful processes

d.exe – This process is registered as a trojan and is spread over the Internet through email attachments. d.exe is designed to steal your personal information.

smss.exe – This process is also registered as a trojan and if present can causes havoc by causing frequent errors and performance related issues. Just like other trojans, smss.exe is effective in stealing a user’s confidential data that it passes to it’s home server.

wscntfy.exe – This malicious process creates numerous other processes, accesses user’s confidential data, and communicates with other computers by creating a TCP port on the infected computer. Immediately disable wscntfy.exe if found running and remove its associated malware.

Manual malware removal – not a recommended approach

By nature, malware programs create various harmful processes and register new DLLs on the system. Identifying all these processes and files manually is practically impossible. Besides creating new processes, malware also fills the Windows registry with various invalid and harmful entries. To ensure complete removal of malware, it is necessary that you remove all its associated files, processes, and registry entries.

How to remove malware effectively

Use a reliable antimalware tool to completely eradicate all threats from your computer. Before performing a malware scan complete the following two tasks:

– Update your antimalware software with the latest malware definitions and security updates.

– Disconnect your Windows PC from the Internet and from any other network to which it is attached.

After completing the above tasks, reboot Windows in Safe Mode and perform a malware scan on the entire system. To restart Windows in Safe Mode, perform the steps illustrated below:

1. Close all applications and restart your PC.

2. Press and hold the F8 key as Windows restarts.

3. Select the Safe Mode option in the Advanced Window Boot Option Menu.

4. Press Enter.

After you have removed the reported threats, use a professional registry maintenance tool to remove invalid and harmful entries that the malware may have added to your registry.

The methods described above are for newbie users, if you are an expert computer user, you may give the manual method of removal a try. However it involves meddling with registry and system files.

Categories
Tips & tricks Windows

How to use your Keyboard as a mouse

I was always wondering if we can use the computer without touching the mouse. Guess what, we can always do that. I have seen many people, they hardly touch mouse while working on their laptop or desktop. The way they use keyboard is by using the tab key, space bar and shortcut keys. But in reality the keys on the keyboard can be used to control the cursor just like we do with a mouse. The only requirement for this method is a keyboard with numeric keypad. So if you are thinking that you can use this method in your laptop, you need to check if it has a numeric keypad.

Do the following steps, for enabling your keyboard to perform the dual task of keyboard and mouse.

In Windows XP:

1. Go to Start > Control panel

2. Click on Switch to classic view from left

3. Double click on Accessibility options

4. On the new window, click on Mouse tab and check the option “Use Mouse keys”

5. Click on OK

– On the keyboard press the Num Lock key, it will make a beep sound.

Now press the keys on the numeric keypad and see how you can control the cursor with keyboard just like you do with mouse. If you want to make the cursor movement faster, on the step 4 click on settings button and make the chnages.

In Windows Vista/Windows 7:

The accessibility option has been changed to Ease of access center in Windows Vista and Windows 7. So we need to make changes in ease of access center. Do the following:

1. Click on Start and type “Ease of Access center” in the search box.

2. Hit Enter to open Ease of Access center.

3. Click on Make the keyboard easier to use.

4. Check the option ” Turn on Mouse keys“, for changing settings click on Setup mouse keys.

5. Click on OK.

Enjoy the fun….

If you would like to share any such tips related to computers, please do so through comments.

Categories
Tips & tricks Windows

Make your computer greet you with a message

A few lines of VB script code will let your computer greet you every time you login to it. This will look straight out of a sci-fi movie and this is so easy and cool. Your not-so-tech-savvy friends will not only be amazed at this but they will think you as a genius.  Use the steps provided below to let your computer welcome you with a personalized message.

 

 

1. Open Notepad and type the following lines of code (or copy the code below to a notepad) :

Dim speaks, speech
speaks="Hello Ajay, Welcome to your Computer. Please use me with care and Love."
Set speech=CreateObject("sapi.spvoice")
speech.Speak speaks

2. You can replace the text within quote (” “) in line 2 to any text you wish.

3. Save the file as speech.vbs . To do this, in notepad click on File > Save as,  select All Types for save as type and put file name as speech.vbs . Make sure the file is saved with .vbs extension and not like speech.vbs.txt . If it is correctly saved the file icon will change from a simple notepad icon to a VB script icon.

4. Now the required script file is ready. For the welcome message upon login, we need to load this file at start up. To do this we need to copy the file to start-up folder.

5. To copy to startup folder, click on Start > All programs and right click on Startup, select explore. This will open Startup folder in Windows Explorer. We need to paste the speech.vbs file inside this.

6. To verify that it is working correctly, restart your PC. If you hear your computer welcoming you, the trick has worked perfectly.

This trick has been personally tested by me in Windows XP SP3, Windows Vista and Windows 7 and works perfectly. Please share your experience on using this script.

Categories
How to

How to fix: Windows 7 sidebar gadgets not working

X73W524MRTB2

This post is based upon my personal experience while solving the issue with my brother’s laptop. Yesterday my brother called me up saying that the clock, CPU meter etc that appear on right side of desktop is no longer working. I got to know that he is speaking about the sidebar gadgets. I asked him to start a remote session using our favorite client Team Viewer. While working remotely on his laptop, I had some interesting findings, which I will describe in the next paragraph.

First of all let me tell that Sidebar was introduced in Windows Vista and it holds mini applications called gadgets. These gadgets are very useful as they provide useful information like time, usage of processor/RAM etc. There are many gadgets available which serve different purpose. The technology behind sidebar gadgets in Windows Vista and Windows 7 are slightly different. in Windows Vista this was independent of User Account Control (UAC) but in Windows 7, it is tightly tied to UAC. So if you have disabled the UAC ( to prevent those unwanted pop ups about permission for each and every task you perform) than the sidebar gadgets will no longer work.  And this was the issue in case of my brother’s laptop.

To fix this issue, we can either enable the UAC which is the easiest method or do some hardcore registry editing steps that will enable the sidebar with UAC still disabled. So let’s discuss about the second method. The following steps will help you in fixing the issue:

As the following steps involve modifying the registry, we strongly suggest you to backup the registry. Techie Zone is not responsible for any issues caused to your computer after following the steps. Read our disclaimer for further details.

– Click on Start > Type regedit in the search box and hit Enter. It will open Registry editor.

– In Registry editor Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Sidebar\Settings

In the right pane, double click on DWORD value AllowElevatedProcess and set the value to 1.

– If the DWORD value is not present, right click on the right pane and click on New > DWORD

– Create a new DWORD called AllowElevatedProcess

– Set the value of the new DWORD to 1

– Close the registry editor.

If you are not confident enough to perform the steps, you can download the following ready made registry file:

AllowElevatedProcess registry tweak

Save the above file (AllowElevatedProcess.reg) on desktop, Right click on AllowElevatedProcess.reg and select merge. This will fix the issue and does not require a restart.

If you have such tips to share, please let us know and we will be glad to publish it.


In the right pane, double click on DWORD value AllowElevatedProcess

Categories
Tips & tricks

How to fix Audio & Video out of sync issue using VLC player

Many of the time when we download a video clip or a movie, we find that the audio does not sync with the lips movement of the characters or the audio and video does not match. This kind of video clip/movie is very frustrating to watch.  However we can use VLC Player to fix such issue and make our video clip play in sync with the audio. And this method of using the VLC player is by far the easiest and cheapest method to fix an unsync video during playtime.

Solution:

Download and install VLC media player (if you do not have it). It is Free.

– Open the downloaded Video Clip in VLC. Right click on the video clip and select Open With..Select VLC from the list.

– If the Audio comes before Video, we need to slow the audio, so press fn+K key (On laptop). Each combi keystroke will reduce the audio speed by 50ms. So keep dong it until you see the video and audio are sync.

– If the Audio comes after the video, we need to make the audio fast, so press fn + J (On laptop) key. When you invoke the shortkey the screen will show the delay amount as shown in the below image:

If you have a desktop, you can try the Ctrl + K and Ctrl + J key respectively for the same result. If the shortkey key does not work , we can change the settings from preferences as follows:

– Open VLC player and click on Tools > Preferences

– On preferences window, click on All under Show settings, Select Audio from left.

– On the right pane look for the option Audio desynchronization compensation

Put a negative or positive value in the box towards right…depending upon the situation. See the image below:

Majority of the audio and video out of sync issue are because of improper encoding format while ripping the video. The solution has been tested with downloaded video clip, so I am not sure if it will work with such issue in a DVD video. If you have issue with a newly purchased DVD than Microsoft has a nicely explained solution in it’s knowledge base.

I have not been able to test this in Desktop, so please put your comment, how you have been able to correct this in desktop..