twentythree7

design, faith, web, photography… life

WP-Cache NoSymlink

As many of you visiting this page have probably discovered, the current version of Ricardo Galli’s Wordpress plugin, WP-Cache2, needs to create a symbolic link between the ‘wp-cache-pahse1.php’ file, and ‘advanced-cache.php.’ If you’re getting “symlink” errors when you try to configure the plugin, you know you have a problem. The official instructions tell you to create the symlink via shell access, but many web hosting companies don’t allow shell access. If you find yourself in this position, and you’ve tried Torkil Johnsen’s solution with no success, then this plugin is for you. WP-Cache NoSymlink while I was managing another website that needed the perfomance increase of WP-Cache, but had no ability to create a symlink. After all of my searching I was only able to find one reference to a fix relevant to my needs, and it’s not easy to find when you don’t know what you’re looking for. So, I made the necessary alterations, and wrapped it up into the plugin we have here. You can now help your Wordpress blog weather traffic from sites like Digg and Slashdot.

Installation

Installation is basically the same as with the original plugin, with one added step:

  1. download, unzip, and upload the ‘wp-cache’ folder to your ‘wp-content/plugins’ folder
  2. place the ‘advanced-cache.php’ file in the ‘wp-content’ folder
  3. go to your Plugins page and activate the plugin

For manual installation, follow these instructions:

  1. download, unzip, and upload the ‘wp-cache’ folder to your ‘wp-content/plugins’ folder
  2. place the ‘advanced-cache.php’ file in the ‘wp-content’ folder
  3. create the ‘wp-content/cache’ directory and make it writable by the server
  4. add the following line to your ‘wp-config.php’ file:

    define(’WP_CACHE’, true);

  5. go to your Plugins page and activate the plugin

Notes

One of the biggest complaints about WP-Cache (official or my version) is that it doesn’t include gzip support. After some searching, I found a solution. If you’d like to try out the beta version of this plugin, please visit my post, WP-Cache NoSymlink Now with Gzip.

Donations

This plugin is always free, but if you find it helpful and you’re feeling generous, please follow the link below to make a donation. Donations only go to help pay for hosting. Unfortunately, the money will never go into my MacBook Pro fund.

Donate towards my web hosting bill!

Download

Current Version: 2.1.2, About this version

39 Comments, Comment or Ping

  1. Hey

    just wanted to say thanks for this - it works like a charm! I was tearing my hair out trying to figure out implementing a “symbolic link” as well, so this was perfect.

    Thanks again
    Chris

  2. Alex

    Just - Thank you!

  3. I get this error with both this and the main 2.1.1 version when I go the WP-CACHE page on Options of the admin panel:

    Fatal error: Call to undefined function: wp_verify_nonce()

    Any idea why? I’ve disabled the plugin until I can figure out why this is happening.

  4. Brandon

    Victor, I’m assuming the site in question is the one you commented with, Chadcast.net. If that’s the case, I would suggest updating your Wordpress installation to 2.0.10, at the very least. You might even consider upgrading to 2.1 (current version is 2.1.3). The only other mention I found where someone was having the same problem was from someone who was also using an outdated version. You can find both, 2.0.10 and 2.1.3 here. Until I have more time to investigate, updating/upgrading would be my suggestion.

  5. I was trying to avoid updating that since I customized parts of the code for a friend of mine on his site there and I didn’t keep track of where the revisions were (I know, I know, bad me, but it was a bunch of freebie quick and dirties strung together over a year or so).

    Thanks for the reply.

  6. jez

    are you running on dreamhost as well mate?
    I was thinking about installing your plugin on my site, but would like to know if you were on DH and if it works out of the box.

    cheers,
    jez

  7. Brandon

    I am running on DreamHost (aff), and since we don’t have problems with symlinks, I would suggest using the official plugin found here. I have not had problems with plugin, and it did work out of the box.

  8. This is wonderful, thanks! We had trouble with symlinks before… any idea why the original author didn’t use this technique from the start?

  9. Brandon

    I believe, but not positive, that earlier versions did things this way, but in order to minimize the the steps needed to install the plugin, and to keep everything in one folder, the author moved decided to use a symbolic link.

  10. Hmn… I tried this plugin on my blog but have this message:

    Warning: Cannot modify header information - headers already sent by (output started at /home/theseobl/public_html/wp-config.php:2) in /home/theseobl/public_html/wp-includes/pluggable.php on line 275

    I think it’s incompatible with my other plugin (Headspace2, which insert meta-tags titles in posts/pages) or am I wrong?

  11. Simon

    Many thanks for this no-symlinks version. My hosting provider does not allow symlinks.

  12. Brandon

    Seo Blogger: I haven’t forgotten about you. I’m just been trying to find the time to test things and see if I can replicate your problem.

    Simon: You’re very welcome.

  13. You save my day. Thanks for this modification.

  14. Very thanks man!

    You help-me very much =D

  15. there is another workaround - but this workaround will make the admin panel non functional - not that big of deal since you can change everythign in the wp-cache-config file by hand.

    http://www.articlesnatch.com/blog/2007/07/30/speed-up-wordpress-with-caching-on-a-cluster

  16. Brandon

    @Matt: Thanks for the comment, and another way around this problem.

    Just so everyone is clear, our workarounds are essentially the same. Both versions get the job done, but Matt’s is without the admin panel functionality intact, and mine is with the admin panel functionality. If you’re comfortable with php code, and like to know how things work, Matt’s method is for you.

  17. thanks a lot for this plugin, i hope it will fix my woes, my hosting just warned me of excessive cpu load.

  18. does increasing Expire time (in seconds) also helps in the performance? what are the pros/cons? thanks a lot, i have just enabled the plugin and i hope it will work for me

  19. acciona

    I get this error message after manual installation and before activating the plugin. I cannot enter my site nor wordpress admin panel, nothing..
    Help how to fix this,pls.
    Thank you.

    Fatal error: Call to undefined function wp() in /www/newsit.es/a/c/c/acciona/htdocs/wp-blog-header.php on line 18

  20. Hello,

    First of all thanks for your great efforts. I try to follow all the instructions, I know that wp-cache is working because I got it down from a loading time of 4 seconds to half a second. The only problem I still have is a blank page after reload, I checked the flush thingy for PHP5 and its changed. I don’t know what else to do, I really would like to keep this plugin. Any help please.

  21. Brandon

    @ videokeman: Increasing the expire time does help with performance. The expire time determines the length of time between page generations. The downside is that occasionally the cache isn’t refreshed when people post comments, so they end up posting their comment multiple times. There are ways around this, but they require you not to cache comments.

    @acciona: You’ll have to edit your wp-config.php file and comment out, or delete the line, “define(’WP_CACHE’, true);”. This should get your blog back up and running. Your problem probably has to do with a plugin conflict.

    @Luis: Sorry to hear about your problem. As you’ve already figured out, it probably has something to do with GoDaddy. More specifically, it probably has to do with the version of PHP 5 they’re using. You can always enable Wordpress’ own cache by adding define(ENABLE_CACHE, true); to your wp-config.php file, which will help a little, although not as much as WP-Cache. The two can be used simultaneously, if/when you manage to get WP-Cache to work.

  22. Thanks Brandon,

    I’m looking to switch hosting company, does anyone know which one will work with wp-cache?

    Thanks again,

    Luis

  23. Brandon

    I use, and love DreamHost. I’ve also heard great things about Media Temple. In fact I’m getting ready to move a client to them, as per my recommendation. I’ve also heard good things about BlueHost. If you’re interested in DreamHost, you can save $40 by using the Promo Code, “TWENTYTHREE740,” at signup.

  24. Brandon

    I’ve added gzip support to the plugin. Right now it’s an either/or situation. Either you use the plugin with gzipping, or you use it without. If everything seems to work alright, I’ll add an option to the admin panel allowing you to turn it on/off, all from within one version. you can find it here: http://twentythree7.com/2007/08/27/wp-cache-nosymlink-now-with-gzip/

  25. Hello

    I have this problem Again :

    Fatal error: main() [function.require]: Failed opening required ….

    Can you help me?

  26. Brandon

    @Habib - which version are you using?

  27. MaXxXiMkA

    Hello
    i have a one question, can i stop wp-cache indexing every posts (single.php) ?

  28. thanks for this no-symlinks version.I’m using a hosting provider does not allow symlinks and this plugin really helped me allot, many many thx !

  29. look at this please
    http://www.askapache.com/wordpress/wp-cache-speed-hack.html
    maybe add this in wp-cache-nosymlink?

  30. ket

    I try to use this plugin with no luck and I have followed strictly as in the README-FIRST instruction. I use wordpress 2.3.1. Do you have any suggestion what I can do.

  31. Daniel

    Wonderful. Thank you!

  32. Thanks a bunch! This saves me a lot of hassle.

  33. Thanks a lot. I’ve been gettting crushed by Stumbleupon and Reddit lately and couldn’t get the plugin to work on my webhost. This was the ticket. I really appreciate it.

  34. After having stuck in implementing wp-cache, coming across this site is a bless. Thank you

  35. Thanks a lot! I first tried the plugin itself, than the other fix which wouldn´t work and then got that one mentioned in your post.

    You made my day!

    Cheers from China,
    Sven

  36. Thanks for this plugin, I’m stuck with wp-cache until i found this no symlink plugin…

  37. thank you so much! This was a life saver :)

Reply to “WP-Cache NoSymlink”

Proudly Hosted By

Paying the Bills

A feeble attempt to recoup hosting fees.

A Random Image