WordPress.org

Ready to get started?Download WordPress

Forums

No cache created by WordPress 2.0.2 (26 posts)

  1. JohnP
    Member
    Posted 8 years ago #

    I have three blogs which are not creating a cache. They are all running on WP 2.0.2 / Mysql 4.1.15 / PHP 4.4.2

    I have tried creating wp-content/cache/ manually, and set permissions of both folders to 777, but no success.

    What should my next step be?

  2. You have to enable the cache in wp-config.php for it to be created.

    It is currently disabled by default as it was causing to many problems to support on every hosting configuration.

    Add the following to wp-config.php


    define('ENABLE_CACHE', true);

    And then it should be enabled.
    You can check its working with my cache inspector plugin - http://blog.ftwr.co.uk/wordpress/wp-cache-inspect/

  3. Mark Jaquith
    WordPress Lead Dev
    Posted 8 years ago #

    I wouldn't enable the cache with WordPress 2.0.2 ... you open yourself up to one of the security vulnerabilities that 2.0.3 addresses.

  4. Very true Mark! I forgot to recommend that above.

    The instructions will of course work for 2.0.3 just as well.

  5. JohnP
    Member
    Posted 8 years ago #

    Ok, I've enabled the cache in wp-config.php

    No change - cache directory stays empty.

    I installed your plugin westi, but I don't see:

    a small semi-transparent box in the top right hand corner of the page

    I do now have a page at Manage > Cache, but the only content is a button to 'Clear the Cache'.

    I understand about the security issue, but need to troubleshoot first.

  6. JohnP
    Member
    Posted 8 years ago #

    Correction to my comment above - I do now see the semi-transparent box on each page.

    Cold Cache Hits stays at: 2
    Warm Cache Hits increases by about 4-5 each page load.
    Cache Misses: mostly stays at 15, occasionally drops to 13-14.
    Loaded data: 12 pages (what I would expect).

    However, /wp-content/cache/ remains empty.

  7. If the cache folder is staying empty then WordPress can't write to it.

    There will still be some cache hits as the cache will be used ,within a single page load, instead of requesting the same info multiple times from the database

  8. JohnP
    Member
    Posted 8 years ago #

    Westi says:

    then WordPress can't write to it

    Any clue about what might be stopping it?

    I've done a second WP installation on the same server, and this also will not write to cache, even with the instruction in wp-config.php.

    Also, I'm puzzled your first reply:

    It is currently disabled by default

    I have WP 2.0.2 running on several other hosts, and the cache started working straight out of the box - no modification needed to wp-config.php.

    I am beginning to think I might have an unsuitable host (I'm already on their case about intermittent timeouts when loading pages), but I would like to be certain that I have eliminated any possibility of mistakes at my end.

  9. arnee
    Member
    Posted 8 years ago #

    Hi,

    the cache is not as efficient as expected. Use WP-Cache with this fix if you want to speed up your blog.

  10. rxbbx
    Member
    Posted 8 years ago #

    should be sticky... many people don't read this..

    they think everything works without adding the code..

  11. JohnP
    Member
    Posted 8 years ago #

    I know about WP-Cache. Unfortunately it seems to require SSH or Telnet access to the webserver (although the author is strangely reluctant to answer questions about this).

    I trying to find out if there is something wrong with the shared hosting server I am using that causes the ordinary WP cache to fail.

    If it is a server configuration that can be corrected I will ask the webmaster to do so.

    If it can't be corrected, I need to know what I should be checking for when evaluating a replacement host.

  12. drmike
    Member
    Posted 8 years ago #

    Unfortunately it seems to require SSH or Telnet access to the webserver

    Strange. Shouldn't. What specifically are you trying to do while SSHing in?

  13. JohnP
    Member
    Posted 8 years ago #

    drmike says:

    What specifically are you trying to do while SSHing in?

    Like most WP users, I only have FTP access to my server. Ricardo's instructions start:

    Step 1. Upload to your plugins folder, usually wp-content/plugins/ and unzip the file

    I can't find any information on how to do this. Every other plugin I unzip on my hard drive then upload, but this does not produce the necessary result:

    it will create a wp-content/plugins/wp-cache/ directory.

    Then the instructions say:

    Step 5. Create a symbolic link from wp-content/advanced-cache.php to wp-content/plugins/wp-cache/wp-cache-phase1.php.

    Reading down past lots of unanswered questions about this I finally see comment 351:

    Clueless, what you need to do is login using SSH (or Telnet) to your server with a user that has the rights to make symbolic links.

    If you are able to explain how an ordinary WP user on a shared host can achieve this it would probably be more appropriate on the plugin page I've linked to.

    I appreciate your help, and the information on how to install the WP-Cache plugin will be very useful to lots of people who can't get an understandable answer from the author.

    However, I'd still like to know why the webserver I am on is not behaving and if it can be fixed.

  14. arnee
    Member
    Posted 8 years ago #

    Hi,

    just try to upload it like every other plugin.

    • Unzip it on your hard drive, upload the whole unzipped wp-cache folder into wp-content/plugins/)
    • Then go to the administration panel and activate it.
    • After that, you'll see a submenu called WP-Cache in the Options menu.
    • If you click on this the first time, the plugin will try to create the symbolic link for you, so you don't need SSH or Telnet.
    • If something fails due the lack of writing permissions, the plugin will tell you what you have to do.

    If you need to change file or folder permissions, have a look at Changing File Permissions at the WordPress Codex.

    Best regards,

    Arne

  15. JohnP
    Member
    Posted 8 years ago #

    Thanks for the simple explanation, Arne.

    The installation went fine - no error messages - no apparent problems.

    WP-Cache is now Enabled with default configuration.

    Cache contents reported as:
    0 cached pages
    0 expired pages

    And no extra code appears in pages to indicate cache is working.

    If I try to look in wp-content/cache with my FTP programme to see if anything is there, I get:
    550 permission denied

    I cannot change permissions on
    wp-content/cache (currently: rwx --- ---)
    or wp-content/advanced-cache.php (currently: rw- r-- r--)
    because user is 'apache', not me.

  16. davidchait
    Member
    Posted 8 years ago #

    typically the ftp user is owner of files on 'good' systems. even on 'bad' systems, the ftp user should have full owner-level control over anything created in your tree by the apache user (if not, must be a permissions issue -- mask, group, something... talk to your sysadmins).

    don't bother using the 'object cache' of WP2 on any standard shared server -- it basically makes no impact. The only time it'd make some impact is when you have a very heavily hit SQL server and lightly hit webserver...

    wp-cache is the plugin of choice. sounds like it got installed properly, but you may need to delete the /cache directory (or, again, talk to sysadmins -- sounds like something odd on your box there!).

    -d

  17. JohnP
    Member
    Posted 8 years ago #

    thanks David. You say:

    when you have a very heavily hit SQL server and lightly hit webserver...

    I actually suspect this is indeed my situation - about 99% of pages load in a flash, but regularly pages begin giving time-out errors and the site becomes unusable for a minute or so.

    talk to sysadmins -- sounds like something odd on your box there!

    I'll forward your comment to the sysadmin - I'm beginning to worry that he is out of his depth here. I certainly am!

  18. JohnP
    Member
    Posted 8 years ago #

    Well, I just tried installing WP-Cache on another server (which I believe is working fine), this time on a newly upgraded WP 2.0.3.

    Just to be clear, I did the following:

    • Edit wp-cache-phase2.php. Search for "ob_end_clean()" and replace it with "ob_end_flush()"
    • Upload wp-content/plugins/wp-cache/ directory
    • Upload edited wp-config.php file with: define(’WP_CACHE’, true);
    • Create wp-content/cache directory and CHMOD 777
    • Activate Plugin
    • Enable Cache in Options > WP-Cache

    Again, install was smooth, no errors, no problems. Site works fine.

    But nothing written to cache (WP 2.0.1 was successfully cacheing previously), and no extra message in source code.

    This time seems to be no problem with ownership, changing permissions etc.

    No doubt I am missing something so blindingly obvious that no-one would think to mention it!

  19. akella
    Member
    Posted 8 years ago #

    Did the same thing as JohnP. using wp2.03 wp-cache 2.0.17.
    Created the sym link on demand(got SSH access).

    There are no errors in admin panel - but cache is empty.
    Now there two of us missing something obvious ...

    The decision would be to use wp1.5 and perfect "Staticize Reloaded 2.6"... :(

  20. davidchait
    Member
    Posted 8 years ago #

    FYI, WP-Cache was actually a derivative of Staticize -- they're essentially the same thing, just WP-Cache has been updated with some optimizations, automatic 'hook' into the WP startup process, admin panel, and some triggers to clear the cache.

    -d

  21. WP-Cache is pretty hard core though and not needed unless your site is being Digged or something. Personally, the built in cache, while not as efficient as WP-Cache, is enough for me and much less of a hassle.

  22. frankp
    Member
    Posted 7 years ago #

    Having the same issue as JohnP - no errors, no warnings, no nothing... just no files being cached.

    please help!!!

  23. frankp
    Member
    Posted 7 years ago #

    My head is spinning from going around in circles on this one.

    Does Wp-Cache not work with WordPress 2.0.5?

  24. BHBuck
    Member
    Posted 7 years ago #

    To anyone having trouble getting their pages to cache, and aren't able to perform the symbolic link... I had the same problem. But I read the following info:

    **************
    6. Add the following line to your wp-config.php file:
    define('WP_CACHE', true);
    Make sure you add the line in the middle of the file, otherwise it won't execute.`
    ***************

    I did this and now everything works.

    Good luck!

  25. truden
    Member
    Posted 7 years ago #

    I was having the same problem with the cache.
    Thank you, BHBuck.
    I would not think of moving that line in the midle of the file :-)

    Now it works.

  26. Shanda
    Member
    Posted 7 years ago #

    For those who have tried everything (as I did), the following fixed it. Not sure where I found it, but thanks to whomever it came from.

    In the wp-config.php file, add:

    define('DISABLE_CACHE', true);
    set_magic_quotes_runtime('0');
    ini_set("magic_quotes_gpc","0");

    I'm running on linux w/ apache.

Topic Closed

This topic has been closed to new replies.

About this Topic