WordPress.org

Support

Support » How-To and Troubleshooting » wp 2.5.1 and caching — how is wp 2.5.x managing it?

wp 2.5.1 and caching — how is wp 2.5.x managing it?

  • I have an installation of wp 2.5.1 in italian on a webhost that limits the number of MySQL queries per hour. So I need to cache dynamic pages.

    This wp install is currently running under PHP 4.4.8, but with zlib.output_compression disabled and cannot be enabled via htaccess.

    My current wp-config has in it the following lines:
    define('ENABLE_CACHE', true);
    define('WP_CACHE', true);

    I even made a “cache” folder within wp-contents.

    But even after logging off, erasing cookies and clearing my browser’s cache, disabling, I don’t see at all the famous line: “<!– Cached page served by WP-Cache –>” at the end of html source.

    Before I get back to my webhost’s support forum I tried getting my bearings on this new version’s support of caching… and, oh boys, I’m a bit pretty much confused.

    Aside from the fact that documentation (codex et al.) related to this cache do not report at all any reference to wp version, aside from the fact that not many messages in this support forums have much details on their wp version, aside from the fact that even third-party caching plugins either are out of date or don’t tell much about which wp versions works with their plugin…

    Aside from all that asides above, what I really would like to know is:

    a) Has someone of the developers inadvertently modified/removed from the output of WP the “cached page” message?

    b) Or have you decided to use only PHP5’s APC feature without even upgrading documentation pages?

    c) Or you changed all the hooks to wp_cache functions?

    I tried peeking into the code of wp at phpxref but, though it contains only the wp 2.5 files, I’ve been left with the feeling that cache-related code isn’t actually used. I might be wrong, and I’m sure that a deeper and careful look at the code may confirm I’m wrong, but I do not have the leisure to read (and understand) other people’s php code for free.

    Please tell me what are the requisites for wp to start caching pages, because after three or four days of battling I’m befuddled and I’m not yet sure if it’s some problem with wp or if it is my webhost’s fault.

    Some meaningful/useful reply would be appreciated.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Yoo-hoo?
    Is there someone in the know that would care to enlighten me on the current status of server-side caching of wordpress pages/articles?

    Hellooo dahlink.

    I dunno about anyone else but this line stood out to me.

    “I do not have the leisure to read (and understand) other people’s php code for free.”

    And yet you expect others to not only give you their code for free, but also explain it, for free.

    Why the flying firetruck do so many people feel the world owes them an answer? Where does that rancid attitude come from?

    whooami

    @whooami

    Member

    ahh, welcome to the wonderful world of wordpress — eventually you’ll understand why my replies can be so impatient.

    Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    Edit: *SNORT* People got to it before me, while I’m typing. Whoo and Ivovic, I try to reply this way as part of my therapy 🙂

    That message at the end of the source is added by a caching plugin. It’s not part of the default WordPress install.

    In 2.5.1 I believe the WordPress native file caching has been removed so this portion should not be needed any more (someone will correct me on that one if I’m wrong):

    define('ENABLE_CACHE', true);

    Do you use fancy permaliks? Try downloading and installing Doncha’s WP Super Cache.

    If you set up the file and directory permissions correctly (wp-content, wp-content/cache, some file permissions for wp-config.php and .htaccess) then this will create static copies of your posts and pages.

    After you enable the plugin, go into the Settings -> WP SuperCache and enable the caching. Read the output on the page; it will tell you if it has a problem that needs fixing.

    The plugin walks you through it and if it can’t modify your config it will say so when you go to enable it in the settings menu.

    Static pages means no mysql queries made. If the pages are updated by you or when people leave a comment, the old copy gets zapped and a new copy gets generated.

    you know, usually I’m a quick study, but for some reason I keep getting stung by this.

    I thoroughly apologise to you, whooami, for ever taking exception to anything you’ve ever said… I can’t really remember what it was that made us collide once or twice, but whatever it was, I’m now thoroughly convinced yours was the sane voice in that.

    back in the early 90s I did the IRC help channel thing. I cut my teeth on that, and on forums for the better part of a decade, until finally taking a 6-year sanity break.

    I’m actually really disheartened that nothing’s changed.

    edit: jdembowski, you’re a better person than I am.

    whooami

    @whooami

    Member

    therapy

    this is not therapy!! 🙂

    Ivovic,

    and it wont ever, unfortunately. Its not just a wordpress thing, though, it could be argued that WP is the windows version of blogs, so a similar dumbing down takes place, that’s manifested on these forums.

    I am not suggesting that WP users are generically dumb, or dumber than other bloggers, just that the supposed ease with which it can be installed, results in an uninformed and sometimes very impatient user profile.

    PS: Im over whatever it was; if I didnt have thick skin, I wouldnt still be here.

    Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    Bystanders: “Why do you keep hitting your head on the wall??”

    Me: “‘Cause it feels great when I stop.”

    To each their own 🙂

    this is not therapy!! 🙂

    actually, this was kind-of refreshing, this little mutual-understanding thing we have going here.

    Hello, my name is Ivovic, and I’m a support-o-holic.

    whooami

    @whooami

    Member

    support-o-holic

    hahahahahahhaha!

    @ivovic: apologies if my snippet on reading other people’s code “for free” displeased you, but unless someone delivers me 48-hours days, I really don’t have much spare time available for trying to debug on my own php code written by other people. 🙂

    …I still have to work for a living, too 😀

    And you have to admit that to someone new to wordpress, trying to make sense and rhyme out of the presently available codex documentation is something that takes time, especially if english isn’t their native language.

    Anyway, thanks for your reply.

    Ok, I’ve installed the wp supercache (for the umpteeenth time), removed the “define(‘ENABLE_CACHE’, true);” from the config file, but it doesn’t seem to work :p

    Keeps saying 0 pages cached and something similar, cache folders keep staying empty, html source of wp pages keeps NOT having the lines Donncha said would be there.

    So I’m asking my webhost if it has mod_mime enabled (and it is htaccess-modifiable) and php safe mode activated.

    Now as it is sunday here and I’m already late for my doings, I’ll just thank you again and see you later, when (and if) I get an answer from them managers.

    Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    I might have missed it but do you have fancy permalinks turned on? If it is set to something like

    /%year%/%monthnum%/%day%/%postname%/

    then you should be good.

    If permlinks is set to the default, then wp super cache won’t get engaged. The permalinks can be anything, just not the default.

    Also, a link to your blog might be helpful.

    @jdembowski
    yep, fancy permalinks were set to “month and name” (/%year%/%monthnum%/%postname%/).

    The blog is on cyberdeaf.altervista.org and I haven’t yet written much in it. Initially I installed the italian version of wp but, just to be sure, I had it reverted back to english (through wp-config.php), just to see if WP-super cache was language-dependent. Still no dice.

    From my webhost’s support forum they say that php safe mode is turned on. For mod mime I still have to get a reply.

    From settings panel I’ve set the super cache to half off and to on, logged off and erased all cookies in both cases, but I still don’t get any caching.

    If I knew which files I should chmod/chown, I’d do it in a flash ;). However, as it’s still early morning here, I must wait for caffeine to find its way to my brain before trying to do anything. 😛

    *snores faintly*

    Moderator Jan Dembowski

    @jdembowski

    Brute Squad and Volunteer Moderator

    Really bizarre. Your wp-content/cache directory exists, but the wp-content/supercache and meta directories don’t.

    Try doing something real temporary. Change the permissions of wp-content/cache to 777 and visit the blog with a browser.

    chmod 777 wp-content/cache

    If it’s a permission issue, then as soon as you browse then supercache and meta directories should get created in the wp-content/cache directory. I say temporary because you are using a shared server and making the directory world writeable is not a good thing.

    If it works then you know it’s a permission issue.

    Also can you check your web servers error_log file? PHP might be tossing warnings.

    Create a file like phpinfo.php on your server and put in it

    <?php
    phpinfo();
    ?>

    I think that will let you know what has been built into your PHP.

    @jdembowski:
    I cannot have a direct access to the error_log file, would enabling the “debug” define in wp-config be as useful?

    I already did the phpinfo(), but the only thing in it that I found and that might be relevant is that 1) the webhost is running a version of php “totally-not-off-the-shelf”, e.g. re-compiled by them 2) though they have the zlibs compiled in php, they’ve disabled gzip compression both in main php.ini and by htaccess (every time I try to enable it thru htaccess I get a nice big no-no)

    this evening (GMT+2), if the lusers at work haven’t yet worn me out, I’ll try the chmodding and, if necessary, I can also copy over the phpinfo output (or just tell me which pieces of it are necessary, as I don’t want to make this thread a queen-sized bed-sheet! :p)

    thank you 🙂

    tcd.

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘wp 2.5.1 and caching — how is wp 2.5.x managing it?’ is closed to new replies.
Skip to toolbar