• Hello,

    Will WordPress 301 an unpublished post (previously active post) kept as draft once it is updated with new url?

Viewing 4 replies - 1 through 4 (of 4 total)
  • WordPress doesn’t generate redirects on its own. It would not know what to redirect to in the case of a previously published post that you then change to a draft. Since WordPress can no longer show that ‘draft’ it has no choice but to return a 404 error.

    You or else a plugin following your direction will need to create the redirects.

    Thread Starter kamalh

    (@kamalh)

    Thank you @jnashhawkins for your kind reply.

    I shall use a plugin in these cases.

    But WordPress does generally redirect an active post even when the url is completely changed right. I know it does. Wondering how that works.

    If you have a plugin to deal with redirects then WordPress will let that plugin handle the redirect. It’s not automatic in WordPress itself as you might have intentions outside of a simple redirect that WordPress might otherwise get wrong.

    If you rename a post via permalinks then it will be known as the new name of the permalink.

    There is also a numeric post identifier that would remain the same.

    If you just edit the Title then only the title changes. That action doesn’t affect the permalink normally as once published the permalink is established ‘permanently’.

    Thread Starter kamalh

    (@kamalh)

    Oh that numeric post identifier is the reason why the automatic redirect works even when the url is completely changed.

    Because all this while I have assumed there was something that wordpress knows about the post apart from the permalink.

    So with my original question, I think the post identifier is gone once I unpublish a post and keep it as a draft. And when I republish it wordpress takes up a new post id. Am I right on this?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘301 after updating an unpublished post’ is closed to new replies.