WordPress.org

Ready to get started?Download WordPress

Forums

WP Super Cache
[resolved] super cache working? (14 posts)

  1. scotttswan
    Member
    Posted 3 years ago #

    I'm running multiple wordpress blogs on a vps which i have root access to.

    when i ssh in and type top to see the top processes. i can see my sites mentioned as a php process even when the page returning has the super cache tag at the bottom and isn't being regenerated each time.

    <!-- Dynamic page generated in 2.930 seconds. -->
    <!-- Cached page generated by WP-Super-Cache on 2011-06-25 19:07:23 -->
    <!-- Compression = gzip -->

    Yet i can reload the page on multiple browser and different ip's etc and it still has a php process attached to that user running.

    I have also removed all plugins leaving my raw theme and there is a php process there.

    This was tested on a new account on my vps that won't have people accessing my site.

    My theme makes use of custom meta on posts and has 3 different loops on different pages.
    i.e.
    <?php $new_query = new WP_Query('r_sortby=highest_rated&r_orderby=desc&posts_per_page=8');?>
    <?php while ( $new_query->have_posts() ) : $new_query->the_post(); ?>
    but surely this is only ran once and stored as a static page rather than built each time?

    i'm using the latest version of cpanel and have tried using a nginx plugin and am currently testing the varnish plugin by unixy but even with those running i still see the user appearing under php when it should be serving static pages.

    Any help will be greatly appreciated.

    http://wordpress.org/extend/plugins/wp-super-cache/

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    So are you using nginx or varnish rewrite rules to serve the static content? The content may be being served by PHP as a fall back.

  3. scotttswan
    Member
    Posted 3 years ago #

    at the moment it is using the varnish cpanel plugin to serve the content.
    But even without nginx or varnish it was still falling back to php to serve the content.

  4. scotttswan
    Member
    Posted 3 years ago #

    i'm using the rewrite rules created by supercache

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    Varnish is supposed to do it's own caching isn't it? The rewrite rules in Supercache are only for Apache so if you don't have that those rules won't be used.

    Apart from that, I don't know why this is happening to you. I don't use nginx or varnish.

  6. sepros
    Member
    Posted 3 years ago #

    hi Scott,

    Can I pay you to help me with some cache issues?

    my skype id is :

    SMARTCHOICEWEB

    Thanks,
    Taylor

  7. zamba
    Member
    Posted 3 years ago #

    Hey, Donncha, did I hear you say Supercache htaccess rules only work with Apache? Does that mean they won't work with a Litespeed server?

  8. Donncha O Caoimh
    Member
    Plugin Author

    Posted 3 years ago #

    zamba - I doubt they'll work unless Litespeed has a compatible mod_rewrite module.

  9. zamba
    Member
    Posted 3 years ago #

    I just asked Wiredtree's support about that, and they said that "For the most part Litespeed is seamless with Apache rewrite rules". So there's a possibility there. But when I used PHP it didn't appear to make any difference, so who knows? I'll keep working on this.

  10. scotttswan
    Member
    Posted 3 years ago #

    With Varnish working my site is running at a much lower load than before.
    Super cache still appears to be making the static pages and php appears to be serving them but they are then cached by Varnish and so my server is much happier!

    i'm using apache which does have mod rewrite so i'm still not sure whats going wrong there.

  11. Ron Rennick
    MultiSite Guru
    Posted 3 years ago #

    Yet i can reload the page on multiple browser and different ip's etc and it still has a php process attached to that user running.

    PHP processes are left running even if they are idle. I use both nginx & apache (on different servers). With my nginx config I have 5 php processes running at all times. Apache varies the number of processes based on the configuration & the number of requests currently being processed.

  12. scotttswan
    Member
    Posted 3 years ago #

    Hi Ron, I think this is the case of what is happening on my sites.

    I can highly recommend using Varnish if anyone else is having trouble with their sites demanding lots of resources.

  13. kitchin
    Member
    Posted 2 years ago #

    LiteSpeed will run your htaccess the same way as Apache, including mod_rewrite rules. I upgraded to LiteSpeed (also at WiredTree) and only came across one issue. I believe the PHP version or settings were slightly different after the upgrade, exposing the problem. But LiteSpeed should be fully compatible with Apache itself. That is how it is designed anyway. And we did see a nice improvement in performance, judging by CPU numbers.

    Here is the issue we did come across. The CDN Synch plugin uses curl to put content on Amazon S3, etc. PHP has a bug affecting curl and open_basedir. You can fix it in cPanel WHM (not normal cPanel), in the "PHP open_basedir Tweak" menu item, if you have access to the full server and don't want to look around for php.ini. See my post in this thread: http://wordpress.org/support/topic/plugin-cdn-sync-tool-no-longer-works-with-resized-images

  14. kitchin
    Member
    Posted 2 years ago #

    Question about Varnish. What settings are you using for memory storage?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic