how to Latest Entries

Standalone Script for Clearing APC Cache

After upgrading WordPress to a new version, you might need to clear the APC opcode cache. Here is a simple script that you can store in the root of your website, for example, clearapc.php:

if (function_exists('apc_clear_cache') && $_GET['pass'] == 'secret') {
        if (apc_clear_cache() && apc_clear_cache('user'))
                print 'All Clear!';
        else
                print 'Clearing Failed!';
        print '<pre>';
        print_r(apc_cache_info());
        print '</pre>';
} else {
        print 'Authenticate, please!';
}

Then call the script via http://example.com/clearapc.php?pass=secret

Instead of using ?pass=secret, you might well call the filename something that is hard to guess: clearapc93920.php

Show Ads Only to Visitors Coming from Search Engines

With the latest design update, I have stripped away most of the clutter in the form of secondary content. It also included removing most of the ads, just because 400 visitors a day is still to few to get more than a single click per day.

I decided to install Ozh’s Who Sees Ads plugin to make ads visible only to visitors coming from search engines. The problem, however, is that it shows ads only on the landing page and not on all pages that the user visits. Read more »