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

Automated tool for saving old URLs #61

Open
billerickson opened this issue Jul 12, 2018 · 1 comment
Open

Automated tool for saving old URLs #61

billerickson opened this issue Jul 12, 2018 · 1 comment

Comments

@billerickson
Copy link
Collaborator

We currently have support for adding custom URLs to query along with a post's permalink, but adding them is a manual process. If you are changing your URL structure and have lots of content, it would be nice to have an automated approach.

I imagine it adding a settings page with two big buttons.

  1. Copy all URLs to Custom URLs (or something like that). This goes through every post in every supported post type and adds the current permalink as a custom URL. This should be run prior to changing permalink structure.

  2. Delete Duplicates. This goes through every post in every supported post type and checks to see if the custom URLs are all unique. If there are any duplicates, or any of them matches the current permalink, it removes the duplicate custom URL. This should be run after changing permalink structure.

I think this would be a good fit for an addon plugin.

@billerickson
Copy link
Collaborator Author

I think this would be a good fit for wp cli (see #80 ). I built my own custom cli command for this but I stored it as a custom meta field rather than using Shared Counts' data structure: https://www.billerickson.net/code/wp-cli-save-permalink/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant