Skip to content

(WP Plugin) for cPanel Servers w/ NGINX+Apache (inc. Cache Purge). (๐Ÿ’™ FOSS: Free Open-source Software)

License

Notifications You must be signed in to change notification settings

The-Network-Crew/TNC-Toolbox-for-WordPress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

211 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿงฐ TNC Toolbox: Web Performance ๐Ÿš€

https://wordpress.org/plugins/tnc-toolbox

Tip

Will expand to include other features as requested by community & clients!

  • Allows you to purge the EA-NGINX User Cache from within WP
  • Automatically purges the cache when a post or page is updated
  • Does the same when the WP Core has been successfully upgraded :)
  • Allows you to disable or enable the NGINX User Cache from inside WP
  • Only presents the options to enable/disable/configure for WP Admins
  • For any action, redirects you back to the page you requested it from
  • Shows you whether or not the API is working via diagnostic quota info
  • Selective cache purging with ea-nginx-cache-purge module (optional)
  • Slack alert (via Webhook) if WordPress fails to send an email to you

๐Ÿ–ฅ๏ธ (PLUGIN) System Requirements

Important

EA-NGINX (Reverse Proxy) by cPanel is supported, not "old school" implementations.

CloudLinux Apache2NGINX (MAx) depends on ea-NGINX so shouldn't cause issues with TNC Toolbox.

  • cPanel API Key, cPanel Username & Server Hostname needed in Settings
  • Hosting Server must run cPanel+WHM, with the ea-NGINX & Apache stack!

๐Ÿ”จ (HOLE PUNCH) Selective Purging how-to

Starting with v2.1.0, you can leverage Selective Cache Purging rather than the entire cache.

To do this, you need to complete some steps - else it will not work. You must be root.

  1. Install the GetPageSpeed repository (dnf/yum) onto the Server:
    dnf -y install https://extras.getpagespeed.com/release-latest.rpm
  2. Install ea-nginx-cache-purge module from GetPageSpeed repo:
    dnf -y install ea-nginx-cache-purge
  3. Add /etc/nginx/conf.d/server-includes/cache-purge.conf
    File Contents: proxy_cache_purge PURGE from 127.0.0.1;
  4. Rebuild & Reload: nginx -t && systemctl reload nginx

We'd like to say a huge thank-you to Danila (GitHub: dvershinin) for this contribution via #35.

โš™๏ธ (INSTALL) How to Install the Plugin

  1. Head to WP-Admin > Plugins, search for "TNC Toolbox"
  2. Click "Install" for the resulting plugin (this one)
  3. Once installed, click "Activate" to make it live
  4. Done! Head to Settings > TNC Toolbox for config
  5. Configure your API Key, Username & Hostname

๐Ÿ› ๏ธ (DEPLOY) Loading it onto all WP sites

Use WP-CLI to install tnc-toolbox for all relevant accounts.

This repo includes scripts for server-wide deploying & updating.

Note: You will need to configure UAPI creds per-website afterwards.

โ™ป๏ธ (UPDATE) v1 to v2.x.x Overhaul

On every website running the plugin, check that:

  1. Website is reporting v2.x.x plugin version.
  2. Plugin has been activated post-update. *
  3. Config exists in the plugin settings.
  4. API status checker reports OK.
  5. /wp-content/tnc-toolbox-config/ folder is gone.

(* Change to main plugin file name may result in deactivation)

๐Ÿ–ฅ๏ธ (LOGS) Verifying ea-NGINX Actions

If you'd like to ensure actions are firing properly at a deeper level:

  1. WHM > Tweak Settings > Logging > Enable cPanel API Log > On
  2. WHM > Terminal > tail -f /usr/local/cpanel/logs/api_log
  3. WordPress > Update a Post/Page, or explicitly Purge
  4. WHM > Terminal > You should see the action fire!
  5. WHM > Terminal > Ctrl+C to close the tail

Note: To do this, you require root access to the Server.

๐Ÿ†˜ (HELP) Getting help with the Plugin

Include all info, screenshots, etc, to help our crew.

Note

Please raise an Issue on the GitHub Repository!

โœจ (FOSS) Contributing to the Plugin

Please feel free to contribute by submitting a PR with your proposed changes!

The Network Crew Pty Ltd (TNC)

About

(WP Plugin) for cPanel Servers w/ NGINX+Apache (inc. Cache Purge). (๐Ÿ’™ FOSS: Free Open-source Software)

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 2

  •  
  •