Get the most out of your Centmin Mod LEMP stack
Become a Member

Wordpress Which plugins to use for better performance for Wordpress?

Discussion in 'Blogs & CMS usage' started by pamamolf, Feb 2, 2020.

  1. pamamolf

    pamamolf Premium Member Premium Member

    3,904
    390
    83
    May 31, 2014
    Ratings:
    +757
    Local Time:
    10:25 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Hello

    Looking for the best options to use for best performance for Wordpress :)

    Should i use Redis? Which wordpress plugins combination do you recommend me?

    Thank you
     
  2. rdan

    rdan Well-Known Member

    5,018
    1,221
    113
    May 25, 2014
    Ratings:
    +1,849
    Local Time:
    4:25 AM
    Mainline
    10.2
    WP Super Cache or KeyCDN Cache Enabler.
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    3,904
    390
    83
    May 31, 2014
    Ratings:
    +757
    Local Time:
    10:25 PM
    Nginx-1.17.x
    MariaDB 10.3.x
    Should i use also Redis?

    Any other plugins that will help?

    @eva2000

    As you are using Wordpress which ones do you recommend me?
     
  4. eva2000

    eva2000 Administrator Staff Member

    45,991
    10,448
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,210
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    All the performance and page speed Wordpress plugins you need will be found in Centmin Mod 123.09beta01 and higher's default centmin.sh menu option 22 Wordpress auto installer routines. See https://community.centminmod.com/th...l-vs-centmin-sh-menu-option-22-install.15435/ and example live Wordpress blog of mine at https://servermanager.guide/ and Centmin Mod Wordpress install guide at https://servermanager.guide/122/how-to-install-wordpress-on-centmin-mod-lemp-stack-guide/.

    In context of Wordpress caching for centmin.sh menu option 22 wordpress auto installer for Centmin Mod 123.09beta01 and newer, you have 3 offered wordpress caching options:
    1. Redis Nginx Level Caching - centmin.sh menu option 22 will auto install redis if not detected if you choose this in centmin.sh menu option 22 setup. Otherwise, need to install redis yourself. Best combined with Autoptimize WP plugin + Autoptimize Gzip companion plugin
    2. KeyCDN Cache Enabler for full page static html caching (safest choice for balance of performance and reliability). Best combined with Autoptimize WP plugin + Autoptimize Gzip companion plugin
    3. WP Super Cache for full page static html caching. Best combined with Autoptimize WP plugin + Autoptimize Gzip companion plugin
    4. PHP-FPM Fastcgi_cache full page static HTML guest cache in private development as of writing so not available yet. Best combined with Autoptimize WP plugin + Autoptimize Gzip companion plugin
    Code (Text):
    Default is to install KeyCDN WP Cache Enabler Plugin as it is more
    stable and reliable than WP Super Cache and Redis Cache.
    Redis cache may have issues with caching due to long 6hr cache TTL
    Fastcgi_cache (PHP-FPM) will have best performance
    You can select which caching method to use below:
    
    --------------------------------------------------------
    Wordpress Caching
    --------------------------------------------------------
    1) KeyCDN Cache Enabler
    2) Redis Nginx Level Caching
    3) WordPress Super Cache
    4) Fastcgi_cache (PHP-FPM)
    --------------------------------------------------------
    Enter option [ 1 - 4 ] 4
    
    you selected option 4 (Fastcgi_cache PHP-FPM) [wpscache=fastcgicache]


    1. Both PHP-FPM fastcgi_cache and Redis Nginx level caching can be fastest but needs fine tuning and deep understanding of your web app and it's plugins to get right i.e. woocommerce etc. So can be problematic too. Most caching is are for guest caching only.

    2. keycdn cache enabler wp plugin - better version of wp super cache for full page static caching of wordpress. Least problematic and closest to set and forget with maybe some tuning needed depending on wp plugins and site configuration. Config is for guest caching only. Highly recommended, if you just want a Wordpress cache method that just works without headaches.

    And regardless of caching method, having right server(s) hardware and configuration and LEMP stack and system TCP level configurations to handle the traffic is a must otherwise regardless of caching used, it won't scale. So you would want non-OpenVZ based VPS like KVM or dedicated. Choosing OpenVZ VPS will limit your scalability.

    FYI, all caching methods = generally higher memory consumption and sometimes higher cache related cpu consumption. The goal of caching in context of wordpress is usually to lessen the load placed on php/php-fpm as that is the weakest part of any LEMP/LAMP setup in terms of scalability. So sometimes caching isn't necessary faster just scales better in high concurrent traffic environments.

    You can see centmin.sh menu option 22 wordpress installed demo and benchmarks on my Wordpress7 demo site with Redis Nginx level cache + Cloudflare and live Wordpress blog at https://servermanager.guide/ with PHP-FPM fastcgi_cache + Cloudflare.
     
  5. tininho

    tininho Active Member

    131
    34
    28
    May 22, 2019
    Nordic
    Ratings:
    +95
    Local Time:
    10:25 PM
    These are the fastest choice for me (free)

    For static sites / not-logged-in-users (Cloudflare):
    WP Cloudflare Super Page Cache
    You can cache your whole page in Cloudflare, with minimal effort.

    Add Cloudflare workers
    https://wordpress.org/plugins/edge-cache-html-cloudflare-workers
    Currently benchmarking cases when this is useful. Does anybody here have more experience on this?

    With this setup I would go with Centminmod cache option 1 (KeyCDN) and use EWWW image optimizer to have images squeezed / Webp conversion (unless you have Cloudflare Pro/Business).

    For logged-in-users (work/learning in progress):
    - Redis as an object cache (cache database queries, not full page)
    - Use Cloudflare to cache, but be careful with which folders you cache (for example /uploads), more here: https://community.cloudflare.com/t/cache-everything-with-wordpress/556/69

    Additionally exclude useless CSS and JS files registered by themes and plugins.
    Gonzales - speed up WordPress (paid - robust, recommended)
    Clearfy – WordPress optimization plugin and disable ultimate tweaker (free - don't use it myself)

    Personally I don't use autoptimize but that is useful in some cases (badly coded themes/plugins). When you use well coded theme such as Genesis Framework, Generate Press, Astra or even OceanWP I don't think you need autoptimize?
     
  6. eva2000

    eva2000 Administrator Staff Member

    45,991
    10,448
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,210
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    Yes if you can get Cloudflare Worker caching working it does wonders. Testing on https://servermanager.guide/ right now too for my own private use.

    Interesting haven't heard of that one yet. Thanks for sharing ! However, concern is requiring your Cloudflare account wide API key can be security issue as it gives access to all your CF acccounts' web sites. It's better to use Cloudflare's new API token keys which can be restricted to specific Cloudflare features and sites/zones and not entire Cloudflare account.

    Autoptimize will always help especially 2.6+ has image lazy load support too. I switched https://servermanager.guide/ from Google Native lazy loading (manually added to functions.php) to Autoptimize 2.6+ enabled lazy loading as well. So far looking good https://community.centminmod.com/th...ermanager-guide-journey-for-page-speed.19108/ :D
     
  7. tininho

    tininho Active Member

    131
    34
    28
    May 22, 2019
    Nordic
    Ratings:
    +95
    Local Time:
    10:25 PM
    You are ofc right, they should implement API tokens for that plugin.

    As Cloudflare is pricing the Bypass Cache on Cookie out of reach (200USD / month), I am forced to try find another way. This plugin has the following options:

    Capture.PNG

    I am wondering whether this would suffice for dynamic sites, such as Woocommerce.
    Additional page rules on Cloudflare costs 1 USD / month / page rule, so I am currently going this way with my try outs.
     
  8. eva2000

    eva2000 Administrator Staff Member

    45,991
    10,448
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,210
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    see WP Cloudflare Super Page Cache
     
  9. tininho

    tininho Active Member

    131
    34
    28
    May 22, 2019
    Nordic
    Ratings:
    +95
    Local Time:
    10:25 PM
    As these limitations are not mentioned or specified, I am afraid I must try :)
     
  10. EckyBrazzz

    EckyBrazzz Active Member

    884
    186
    43
    Mar 28, 2018
    >>>>Click here<<<< i'm nearby......
    Ratings:
    +342
    Local Time:
    5:25 PM
    Latest
    Latest
    I noticed that on many sites the Google Native lazy loading did not work, especially with sliders, so had to use to Auto-Optimize option for these sites.

    Still use it together with the WP-Rocket & SatelliteWP/rocket-nginx and can tell it's blazing fast.

    Works perfect with Cloudflare & Wp MultiSite. (sorry still have to post the config).
     
  11. eva2000

    eva2000 Administrator Staff Member

    45,991
    10,448
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,210
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    it's due to the criteria coded by Google as to when to lazy load and when not to and it's dependent on internet speed detected by visitor i.e. mobile detected speeds will load all images within first 3000px vertical pixels which is to lengthy !

    I also switched from Google native lazy load via functions.php edit to Autoptimize 2.6+ lazy load via lazysizes for my Wordpress blog at https://servermanager.guide/ :)
     
  12. asperty

    asperty New Member

    18
    15
    3
    Apr 13, 2019
    Ratings:
    +19
    Local Time:
    10:25 PM
    1.17.1
    10.3
    +1
    I could never get cache enabler and autoptimize to equal the speed of this combo. Maybe it has to do with the critical css which autoptimize doesn't include as standard
     
  13. eva2000

    eva2000 Administrator Staff Member

    45,991
    10,448
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,210
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    While evaluating other Cloudflare cache purge plugins for Wordpress I just tried this out on test Wordpress install used for my guide writeup at https://servermanager.guide/203/wordpress-cache-enabler-advanced-full-page-caching-guide/ and they have API Token support now along with CF Worker support if you don't mind paying US$5 per 10 million requests on paid or <100k free requests. But be aware their debug.log is exposed publicly to the world so need to lock that down Preventing debug.log web browser access and caching ? | WordPress.org. Latest updated centmin.sh menu option 22's wpsecure include file generated now as deny all rule for debug.log public attempted access Beta Branch - update centmin.sh menu option 22 wpsecure include file template in 123.09beta01

    They don't support Cache Enabler though as they now have their own fallback page HTML cache though I tested their CF Cache + Cache Enabler to be faster - they still believe their solution is faster Add 3rd party support for purging Cache Enabler plugin | WordPress.org
    easy just enable Autoptimize's aggregate inline CSS checkbox it's pretty close to equivalent
     
  14. tininho

    tininho Active Member

    131
    34
    28
    May 22, 2019
    Nordic
    Ratings:
    +95
    Local Time:
    10:25 PM
    True, but this could lead to oversized cache, which can be solved with: https://wordpress.org/plugins/autoclear-autoptimize-cache/

    Another (free) way is to use: Critical Path CSS Generator - by Jonas Ohlsson


    This generates above the fold content, but for homepage only.

    To automatize it for all page types, you have to pay: criticalcss.com | Excellent website speed for all

    I have not been able to get that Workers integration working in WP Cloudflare Super Page Cache. Instead I am experimenting with https://wp2static.com/ for non-dynamic sites, since I could utilize Amazon S3 buckets or Netlify for WP hosting.
     
  15. eva2000

    eva2000 Administrator Staff Member

    45,991
    10,448
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,210
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    another plugin to investigate :D (y)

    Yeah I am paying for non automated version just to test it out on various plugins that allow you to input critical css into them.

    Interesting - will play with their Worker integration later. I already have my own CF Worker Wordpress and Xenforo scripts which work well for guest only full page HTML caching bypassing Wordpress and Xenforo cookies with more advanced CF CDN caching so probably stick with that. Though CF workers have a usage billing cost at US$5 per 10 million requests. 100 million CF workers requests/month would = US$50/month billed usage.

    workers-month-01.png

    Yeah always heard of wp2static but really with my version of Cache Enabler https://servermanager.guide/203/wordpress-cache-enabler-advanced-full-page-caching-guide/ you don't need to go that far with wp2static anymore :)

    One Reddit user as asking about such and I gave same reply What is the simplest way to convert a WordPress website to Static : Wordpress :)

    FYI, expect more updates to my centmin.sh menu option 22 routine to come as I supe-up my Wordpress installer's out of the box performance some more.

    @tininho and others if you have more Wordpress performance plugin/tips to recommend, post them in this thread so I can check them out eventually :D
     
  16. dce

    dce New Member

    24
    6
    3
    Feb 21, 2018
    Ratings:
    +6
    Local Time:
    3:25 PM
    Hello eva2000,
    I usually work with Drupal but I have to do a site whose requirements are more suited to WP.

    Does the guide you linked above give the WP setup you have found to give optimum performance and reliability based on your research on the subject (your latest and greatest)? Do you update as you find new ways to improve the recipe?

    Other than the usual server lock down practices, any WP specific security recommendations you suggest for this setup?

    Cheers from Canada!
     
  17. eva2000

    eva2000 Administrator Staff Member

    45,991
    10,448
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +16,210
    Local Time:
    6:25 AM
    Nginx 1.19.x
    MariaDB 5.5/10.x
    optimisation happens on server end and in front of server i.e. Cloudflare. The guide is optimal for server end and for static files behind Cloudflare proxy. To do more, need to optimise in front of server i.e. Cloudflare optional config for dynamic HTML caching etc not part of the guide but mentioned in guide.

    It's secure by default. If Cloudflare in front and it isn't a member login based Wordpress site, and just you logging in, then you can use Cloudflare Access to lock down wp-login.php too.
     
  18. computer19852007

    computer19852007 Member

    83
    8
    8
    Jun 25, 2014
    Ratings:
    +8
    Local Time:
    3:25 AM
    Centmin Mod 1.2.3-eva2000.06
    MariaDB 5.5.34
    Hi @eva2000

    Please compare PHP-FPM Fastcgi_cache vs KeyCDN?
    Have i use both?
     
    Last edited: Jan 5, 2021