I have an old post set to private. When I visit it in a browser, Network in DevTools shows that it is endlessly redirecting to itself. I have switched off my redirect plugin, that didn't help.

I wondered if it was a canonical redirect, so I tried this in functions.php:

remove_filter('template_redirect', 'redirect_canonical');

No success, so I tried:

remove_action('template_redirect', 'wp_old_slug_redirect');

And, that has fixed it. However, I then checked for old slugs:

SELECT * FROM `wp_postmeta` WHERE `meta_key` = '_wp_old_slug'

There is no entry with the relevant post_ID?! How do I fix this one page?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.