Avoiding the Digg Effect on Textpattern: How to Install Page Caching

Raven

Avoiding the Digg Effect on Textpattern: How to Install Page Caching

Textpattern is a fast content management system (CMS). In fact, many tests have shown it to be much faster than its competitors, like WordPress. However, it’s still a CMS, which means its content is dynamic and it requires a connection to a database to serve complete pages to a Web browser. That can be a major problem if the website receives a huge amount of traffic from being Dugg on Digg.

The best way to prepare Textpattern — or any other dynamically driven site — is to setup page caching. Page caching creates a static version of a page. The static page reduces the need for the server to communicate with the database and to create a new HTML page with every request. Returning static pages greatly increases the amount of users the server can deliver pages to. How great? According to Matt Wade in his entry, “Optimizing Textpattern for Performance,” he was able to go from <30 request per second to >250 requests per second using a Textpattern plugin called asy_jpcache.

I’ve been using asy_jpcache on several sites and so far it works flawlessly. If you run Textpattern and you want to prepare for your 15 minutes of fame, then you should install this plugin.

Instructions for Installing asy_jpcache on Textpattern

1. Download asy_jpcache

asy_jpcache is available from the Textpattern Support Forum

2. Copy the jpcache Folder & Set Permissions

SFTP or FTP into your website. Copy the entire jpcache folder into your root directory. Unlike other plugins, this folder should not go inside the textpattern folder. It should be directly above it in the root directory — where the images and files directories are located.

After the transfer is complete, you need to change the security settings on the cache folder to 777. The cache folder is located inside the jpcache folder. If you’re using Transmit, you can select the folder and then press Command+I to bring up the security settings. Change the number to 777, click the Apply button and then close the window.

3. Edit the Index File

Open the index.php file in the root directory and add include './jpcache/jpcache.php'; directly above include $txpcfg['txpath'].'/publish.php';. Then save and close the file.

4. Install the Textpattern Plugin

Open asy_jpcache.txt, select all and copy. In the Admin of your Textpattern website, click on the Admin tab and then the Plugins tab. Paste the code in the Install plugin textarea and then click on the Upload button. After it successfully uploads the plugin, click on the Install button. Finally, click on the No link to activate it — No will turn to Yes after you click on it.

Related Posts Plugin for WordPress, Blogger...

Tell us what you think

  • http://www.caravanwise.co.uk/ Phil

    I just followed your instructions on one of my sites and they worked perfectly. The site seems to be far more responsive.

    Thanks Phil

  • http://www.jlbworks.com/blog/ JLB

    Very helpful!

    I followed your instructions to the T, and everything worked just as you said it would.

    THANKS JON!!!

  • http://www.stevelam.ca steve

    ahh good ole’ textpattern! thanks for the tips.

  • http://www.artrogue.com/ Matt Mikulla

    Great tip. I will probably implement it on my site.