Two small optimisations to the blog today: adding a caching plugin to speed up page loads, and wiring up visitor analytics.
Enabling the TpCache plugin#
- Go to the TpCache GitHub repo.
- Download the plugin:
https://github.com/phpgao/TpCache/archive/master.zip - Drop it into the site’s
/usr/plugins/directory. - Unzip it and rename the folder to
TpCache. - In the site admin panel, go to Plugins, find TpCache, and enable it.
- If
Memcache/RedisPHP extensions aren’t installed, it’ll fall back to a MySQL-backed driver.
- If
- Once it’s configured, force-refresh the homepage to see the effect.

If you don’t want to bother setting up Redis, that’s as far as you need to go.
Adding Google Analytics#
- Open Google Analytics and create a new account in settings.
- Once created, go into the tracking-code configuration and add it manually.
- Copy the tracking snippet, then find the
header.phpfile in the current Typecho theme. - Paste the snippet in anywhere sensible — you can verify it’s working from the Google Analytics dashboard.





