If you mean the post name field, then we can update it for a post with:
wp post update 123 --post_name="new-slug"
where 123 is the post ID.
If we then try to update another post with the same post name:
wp post update 321 --post_name="new-slug"
then it will be set to new-slug-2
in that case, as it needs to be unique. If we continue this with other posts, then we will get new-slug-n
where n
is a positive integer.
Related Posts:
- Change media item permalink
- Why is “/page/2/” not working?
- Creating custom permalink structure for languages
- What is the difference between get_permalink vs get_the_permalink?
- Is the permalink structure /%post_id%/%postname% faster or slower than just /%postname%?
- Using underscores instead of hyphens in the permalink
- How can I force WordPress to redirect to canonical permalinks?
- Why would Numeric permalinks work, but %postname% won’t?
- Remove subfolders from URL
- Changing pemalink structure to /%post_id%/%postname%/
- htaccess or redirect to cloak portion of a link?
- Update Old Links To Pretty Permalinks Custom Post Type
- WordPress Permalinks %postname% for RSS2 Feed URL
- remove permalink trailing slash
- Use Single Blog Post as Site Front Page Without Redirect
- wordpress permalinks tweeks
- generate custom permalink based on a custom field
- Redirect old permalinks with Month and name to Post name on new site
- How to get wordpress link to fully evaluate when coming from facebook
- Getting links to work the same on development and production
- stop the_permalink printing and save as variable?
- Change author slug and functionality
- Setting up two separate blogs while using WordPress as a CMS
- Changes to .htaccess not updating the file (old rules still take effect)
- Custom theme navigation
- get permalink and append it
- How to redirect to correct pages after permalink structure change
- Moving local wordpress page to a real server subdomain broke my permalinks?
- Only plain permalinks working
- next_posts_link URL does not include name of custom post type
- Media Gallery Images – safe to change permalink?
- How to remove specific category from URL in WordPress
- How to set permalinks when posts and pages have different URL structures?
- redirect/ %category%/%postname%.html to /%category%/%postname%
- WordPress disallows changing page to a specific permalink
- Custom permalink leads to index page
- How to eliminate permalink prefix in WordPress Multisite
- wp not making CPT permalink / slugs unique
- Permalink Doesnt Work – URL Not Found
- WordPress 4.4 old permalink redirect
- 404 when going to /blog
- WordPress keeps giving me the wrong permalink
- Permalinks 404 error with HTTPS host
- Mirror content based on URL slug
- Empty permalinks settings in .htaccess
- Rewriting single post url; add_rewrite_rule problem?
- WordPress permalink prefix
- Hierarchy of Subcategories on Permalink (bug?)
- How can I make internal anchor links work with WordPress’s permalinks?
- How do I get thumbnail generator to recognize the_permalink tag?
- wordpress how to replace url /bar with foo/bar for custom post type
- Can WP give a value a post ID?
- Page Name and Permalinks
- how to get a list of all top level pages
- Permalinks on Windows IIS not working and web.config breaks site – does wordpress not support windows server now, if so how?
- I’ve removed my /author/ slug but it clashes with new and existing pages. Any fixes?
- Exclude single page from permalink rule
- Changing the entire permalink
- How are WordPress Page URLs affected by permalink settings?
- Home page Pagination – Other pages do not redirect to home page template
- Access posts while mod_rewrite is broken
- Update page breaks permalinks
- WordPress switch servers
- Browsing to permalink prefix results in 404
- Tag pages do not show
- WordPress Posts forced to load as Uncategorized
- replicate url permalink after migrating to wordpress
- I need to change the attribute of the isPermaLink guid in the WordPress RSS feed – from false to true
- Permalinks Question: Adding a prefix ONLY in front of the posts
- Modify post slug before saving
- Changing permalink for blog posts, current structure www.website.com/blog-post, change to, www.website.com/blog/blog-post
- Permalink refresh, the good, the bad, etc. What is best?
- Fatal Error when trying to load Permalinks page on WP admin [closed]
- Author URL using wrong domain after using Edit Author Slug
- 404 on wordpress multisite Permalink pretty URLs
- Cannot publish posts or pages when I change permalink structure
- Remove Permalink of certain posts
- append current user-id to all internal permalinks
- How to find a page in admin based on it’s permalink
- rebuilding/ rewriting a url to make it SEO friendly
- Very strange behaviour related to htaccess and custom posts and custom posts substrings (BUG?)
- Pagination links for taxonomy archive page 404 error on every page except first
- Changed Permalinks settings, how do I redirect posts on Nginx?
- Facebook Share Permalink Javascript href
- Change all pages permalinks instead of hierarchical to have id of the page
- where is the media permalink info stored in database?
- Links after changing hosting and domain
- Category-dependent custom permalink
- Pretty permalinks (again)
- How can I get WordPress CPT archives and page templates to work with prettified permalink settings?
- Passing user defined variable into get_permalink
- WordPress Archives Cause Looping
- Custom permalink structure for custom post type results in 404
- ?posts_type=xxx not rewritten
- Change permalink when page category selected in admin
- Category pagination first link works, remaining don’t
- Custom rewrites for pages and categories
- Why doesn’t my page know it’s a page (won’t return true for is_page())?
- How to change my URL on intranet
- Remove parent product category slug from product_cat url woocommerce