Paper Lantern for cPanel accounts is being retired this year. Find out more »
cPanel & WHM Version 102 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

(NGINX User Cache) Purge from within WordPress (Simple Plugin for WP)

Luke Thompson shared this idea 2 months ago
Open Discussion

G'day,

After making the switch to the NGINX + Apache + PHP-FPM stack with most clients running WordPress, it's become clear that having an NGINX Cache Purge one-click link within WordPress is a fundamental tool that many would benefit from immensely!

This would reduce time spent on mundane work, as the staff can remain within WP and click-and-carry-on, rather than new-tab > WHM > cP SSO > NGINX Purge. Just a week into the new stack, we have had this request from a bunch of clients. There's feedback online as well.

https://forums.cpanel.net/threads/cpanel-nginx-and-wordpress.704621/ (whole thread)
https://forums.cpanel.net/threads/whm-96-nginx-cache.690045/ (towards the bottom)
etc.

Developing this and keeping it supported would presumably be quite simple and low-maintenance given it's ready-to-go in the UAPI - https://api.docs.cpanel.net/openapi/cpanel/operation/clear_cache/ - and an admin bar "Clear NGINX Cache" link via this hook it seems https://developer.wordpress.org/reference/hooks/admin_bar_menu/ - is this easily achieved?

With this NGINX implementation now 1.5 years mature, it seems a great time to add this in! :-)

Many thanks.

Replies (6)

photo
2

yes agree - without a plugin that you can purge from within WP we will be disableing NGINX.

photo
2

100% Agree with Luke's comments as it becomes frustrating for me and my team when developing in WordPress.

photo
1

Agree this is a must. We don't run cPanel's NGINX implementation for this very reason.

photo
1

Agreed, no cache plugin for WordPress makes our customers confused.

photo
1

Hey follks!

Thanks for the feedback. We don't currently provide integrations that exist within WordPress. This is not to say we won't. For that reason, I've transitioned this to open discussion in order to gain further feedback.


Thanks!

photo
1

We've now published a WordPress Plugin that provides a one-click Purge NGINX Cache button in the admin top bar:

https://github.com/LEOPARD-host/TNC-WP-Toolbox

It needs a cPanel API Token to be set in a static file above public_html for it to work. Hopefully it helps others. Thanks!

Leave a Comment
 
Attach a file