Welcome to Centmin Mod Community
Register Now

Wordpress Moving from WP suepr cache to W3 Totel cache

Discussion in 'Blogs & CMS usage' started by Yohan, Sep 24, 2015.

  1. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    6:58 AM
    1.9.x
    MariaDB 10
    Real Domain name replace with my domain.info ...


    Code:
    # Centmin Mod Getting Started Guide
    # must read http://centminmod.com/getstarted.html
    
    # redirect from non-www to www
    # uncomment, save file and restart Nginx to enable
    # if unsure use return 302 before using return 301
    #server {
    #  listen  80;
    #  server_name mydomain.info;
    #  return 301 $scheme://www.mydomain.info$request_uri;
    #  }
    
    server {
      server_name mydomain.info www.mydomain.info;
    
    # ngx_pagespeed & ngx_pagespeed handler
    #include /usr/local/nginx/conf/pagespeed.conf;
    #include /usr/local/nginx/conf/pagespeedhandler.conf;
    #include /usr/local/nginx/conf/pagespeedstatslog.conf;
    
      # limit_conn limit_per_ip 16;
      # ssi  on;
    
      access_log /home/nginx/domains/mydomain.info/log/access.log combined buffer=256k flush=60m;
      error_log /home/nginx/domains/mydomain.info/log/error.log;
    
      root /home/nginx/domains/mydomain.info/public;
    
     include /usr/local/nginx/conf/wpsupercache_mydomain.info.conf;
    
      location / {
    
      # Enables directory listings when index file not found
      #autoindex  on;
    
      # for wordpress super cache plugin
      try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    
      # Wordpress Permalinks
     # try_files $uri $uri/ /index.php?q=$uri&$args;
    
      }
    
    location ~* /(wp-login\.php) {
      limit_req zone=xwplogin burst=1 nodelay;
      #limit_conn xwpconlimit 30;
      auth_basic "Private";
      auth_basic_user_file /home/nginx/domains/mydomain.info/htpasswd_wplogin;
      include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
    location ~* /(xmlrpc\.php) {
      limit_req zone=xwplogin burst=2 nodelay;
      #limit_conn xwpconlimit 30;
      include /usr/local/nginx/conf/php-wpsc.conf;
    }
    
      include /usr/local/nginx/conf/wpsecure_mydomain.info.conf;
      include /usr/local/nginx/conf/php-wpsc.conf;
      include /usr/local/nginx/conf/staticfiles.conf;
      include /usr/local/nginx/conf/drop.conf;
      #include /usr/local/nginx/conf/errorpage.conf;
      include /usr/local/nginx/conf/vts_server.conf;
      include /usr/local/nginx/conf/block.conf;
    
    }
     
  2. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    From:
    Code:
    # for wordpress super cache plugin
      try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    Replace with:
    Code:
    # for wordpress super cache plugin
      try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$args;
    Then restart Nginx.
     
  3. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    That's what I'm using and it works great.
    [​IMG]
     
  4. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    11:28 AM
    Nginx 1.25.x
    MariaDB 10.x
    step 3 hasn't been done yet
    Code:
    ------------------------------------------------------------
    To complete setup:
    1. Enable Permalinks (DO NOT use links with .html extensions for performance reasons) i.e. /%post_id%/%postname%/
    2. Settings Menu > Super Cache > Easy tab and enable it by checking Caching On (Recommended) and hit Update Status
    3. Advanced tab & check Use mod_rewrite serve cache files & Don’t cache pages with GET parameters and Known User.
    (Recommended) & hit Update Status
    4. WP Security Menu > Settings > Check All except Enable Live Traffic tool and hit Update settings
    5. Settings Menu > Updates Notifier and setup your notify email address and cronjob (save and test button to check)
    6. Settings Mnenu > Autoptimize and check Optimize HTML, JavaScript and CSS options (show advanced settings)
    7. Settings Menu > Limit Login Attempts and configure as desired or leave as defaults
    8. Sucuri Security Menu and top left click Generate API key for your domain/email and configure your Settings tab
    9. WP-Optimize Menu and configure as needed
    10. Memory Usage Menu > Settings and adjust accordingly
    11. GTmetrix Menu > setup and register your GTmetrix Account and API Key
    12. go-newrelic plugin installed but not activated read WordPress › Gigaom New Relic « WordPress Plugins
    13. Tools > P3 Plugin Profiler > Start Scan to profile all your plugins
    14. Plugins > Query Monitor is disabled by default, enable to check MySQL query stats
    15. Plugins > DB Cache Reloaded disabled by default unsure if works with Wordpress 4.x ?
    16. Appearance > Theme Options (Responsive theme) > Home Page nav bar > Uncheck Overrides Wordpress front page option
    17. Seo Menu (Yoast SEO) > configure accordingly
    18. Settings > UpdraftPlus Backups > Settings set file/database backup intervals & optional backup to remote storage
    19. Analytics > Settings > configure your Google Analytics UA Code
    ------------------------------------------------------------
    also click list cached files as the page itself might have been cached
     
  5. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    And this is my Wp-Super-Cache advance settings:
    [​IMG]
     
  6. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    6:58 AM
    1.9.x
    MariaDB 10
    Noting happen .. still making empty directory's ..
     
  7. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    11:28 AM
    Nginx 1.25.x
    MariaDB 10.x
    i have no probs with default
    Code:
    # for wordpress super cache plugin
      try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?q=$uri&$args;
    upload_2015-9-24_19-45-54.png

    upload_2015-9-24_19-47-47.png
     
  8. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    Follow this step manually, maybe you messed it when you install Wp-Total-Cache:

    Then some additional commands to ensure permissions and WordPress Super Cache are setup correctly. Still done within your WordPress installation directory at /home/nginx/domains/yourdomain.com/public:
    Centmin Mod Nginx vhost format and create php.conf include file specifically for WordPress Super Cache.

    Create WordPress Super Cache specific php.conf include file named php-wpsc.conf by making a copy of the existing php.conf making a sed replacement change to php-wpsc.conf.
    More info: WordPress + Super Cache plugin for Centmin Mod Nginx | wp1.centmincache.com
     
    Last edited by a moderator: Sep 25, 2015
  9. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    6:58 AM
    1.9.x
    MariaDB 10
    (y)(y)(y)(y) Its WORKING!!!!! Thanks you very much .. so do i need revert back to Vhost as Default ?
     
  10. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    What changes make it work? :)
     
  11. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    Yeah, much better to revert to default vhost.
    And see if it still works.
     
  12. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    11:28 AM
    Nginx 1.25.x
    MariaDB 10.x
    backup existing vhost file just in case
     
  13. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    11:28 AM
    Nginx 1.25.x
    MariaDB 10.x
    nice edited your post as no space between the cp cmd files
    Code:
    \cp-f/usr/local/nginx/conf/php.conf /usr/local/nginx/conf/php-wpsc.conf
     
  14. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    6:58 AM
    1.9.x
    MariaDB 10
    Let me explain !! actually there was some issue with hitting and saving setting in WP super catch .. so i hit many time with right setting as per @RoldanLT so its get start to working suddenly ... any idea ?
     
  15. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    2nd hit on any page should create full page cache right away.
     
  16. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    11:28 AM
    Nginx 1.25.x
    MariaDB 10.x
    restart nginx and php-fpm after hitting submit/save as page you're viewing may be cached

    Code:
    nprestart
    also to verify WP Super Cache is working Wordpress Nginx Auto Installer (WP Super Cache)
     
  17. Yohan

    Yohan Member

    68
    3
    8
    Sep 24, 2015
    Ratings:
    +4
    Local Time:
    6:58 AM
    1.9.x
    MariaDB 10
    Here is result .. when i revert to original Vhost super cache plugin stooped to work and when i replace with below code its Start to work!
    Code:
    # for wordpress super cache plugin
      try_files /wp-content/cache/supercache/$http_host/$cache_uri/index.html $uri $uri/ /index.php?$args;
     
  18. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    11:28 AM
    Nginx 1.25.x
    MariaDB 10.x
    how are you verifying that it works ? logged in users won't see the caching if it isn't populated by a non-logged in session
     
  19. eva2000

    eva2000 Administrator Staff Member

    51,248
    11,900
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,374
    Local Time:
    11:28 AM
    Nginx 1.25.x
    MariaDB 10.x
    also are you using wp permalinks ?
     
  20. rdan

    rdan Well-Known Member

    5,431
    1,393
    113
    May 25, 2014
    Ratings:
    +2,179
    Local Time:
    9:28 AM
    Mainline
    10.2
    Maybe he verify on Admin Wp-Super-Cache cache content.
    [​IMG]