Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PurgeUrl purges with trailing slash, but my permalinks have no trailing slash = no purge #124

Paike opened this issue Sep 10, 2016 · 4 comments


None yet
5 participants
Copy link

commented Sep 10, 2016

my site does not use trailing slashes in the permalinks. In purger.php line 208 it hard codes a trailingslash to the url. So in my setup the cached pages are not purged. Full purge does not work either.

When you open the purge-url in browser with and without trailing slash, the key and path will be different.
( and

When I remove trailingslashit() the pages were purged correctly.

function purgeUrl( $url, $feed = true ) {
    global $rt_wp_nginx_helper;
    $url = trailingslashit( $url );
    $this->log( "- Purging URL | " . $url );

This comment has been minimized.

Copy link

commented Feb 28, 2017

Hello. This is also an issue for our setup where we don't have trailing slashes, like @Paike


This comment has been minimized.

Copy link

commented Aug 8, 2017

Yes same problem. Somebody told me that the problem started to emerge after this commit: 976574c

and indeed it adds a slash, however i can't figure out why there need to be an extra slash, isn't the url parsed properly?

When i figured out how i can sync my fork with the current master. I can fix it and do a pull request.


This comment has been minimized.

Copy link

commented Apr 10, 2018

Is this issue still open? I've got the some problem.
One possibile fix could be this (sorry for not opening a PR): inside purger.php, in function purgeUrl, replace

$url = trailingslashit( $url ); 


$url = user_trailingslashit( $url );

This comment has been minimized.

Copy link

commented Apr 11, 2018

I've fixed this issue in new minor version 1.9.11. I'm sorry for the delay. Please check and let me know if it's working fine.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.