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:
- Is it possible to get a page link from its slug?
- Adding another word in front of post url
- WordPress 4.4+ breaks Walker Extension
- How to add a custom URL placeholder to author archives?
- 301 Redirects for Changed Permalink Structure & Category Base
- permastruct for custom post type not working in one of four cases
- Deleted Page Still In WordPress Database
- How to Remove Slug From Database?
- Slash is being stripped in my post_name when using wp_insert_post
- Non-Latin Characters in permalinks
- Custom Rewrite with Query vars
- Change link to other post to shortlink in the editor
- Auto 301 to full post permalink? (using /posts/%post_id%/%postname%)
- Using only %postname%
- Change permalink only on new posts
- Rewriting permalinks with custom posts
- How to Modify Existing Rewrite Rules?
- After moving from subdirectory to home, home page does not display
- Specific URL Rewriting with parameters in wordpress
- Rewrite Page with a slug before page name
- Can two products with the same name but different category produce unique URLs?
- Permalink settings not saving
- If the only permalink setting is %postname% what happens in the case of old duplicates?
- Get closest page ID from URL
- How to create thousands of endpoints for a post or a page or a custom post type programatically?
- AWS WordPress Install – pages/posts 404 on restart until updating permalinks
- How to add_rewrite_rule with two parameters to a single view page?
- WordPress get permalink function
- Site moved to HTTPS and loads as HTTPS but permalinks show as http
- Exclude / Blacklist Permalinks
- Point domain to different webhost’s subdirectory wordpress
- 404 Error Problems with sCategory Permalink plugin
- Default setting permalink /blog/
- Need help getting my Permalink structure right
- Redirect Uploads Folder to Query Vars in WordPress
- how to link post-thumbnail to original img in a lightbox?
- Losing preview ability: W3 Total Cache + Post name permalinks
- Get the url of a page template without using the page slug and ID
- flush_rewrite_rules breaks permalinks
- How to show permalink auto when type text in post tiltle?
- Accessing Subdirectories in WordPress Install
- Permalink for custom post type
- Change Permalink of attachment page
- Strange Anchor Tag Behavior (in-page links work, external pages do not) [closed]
- WordPress 3.1 .htaccess contents keep dissappearing?
- Permalink in WordPress loop outputs for each new line
- Freeze child page URLs so parent permalink changes don’t give 404s?
- How can I say if a URL is a post, page, or taxonomy archive?
- Custom post type clean shortlink
- cannot link a external url, present page url acting as parent url
- add_rewrite_rule on default post type
- how to find duplicated permalinks?
- the_content(); erroneously closing off previous opening before it
- Bulk append URL (add word to slug)
- Conditional Permalink based on category?
- Permalink Custom Page Template
- permalink error when modifying sanitize_title_with_dashes function
- The requested URL was not found on this server [closed]
- Shortcodes not working
- How to create posts or pages with the names in wordpress?
- WordPress permalink not working on subdomain
- How to construct a dynamic rewrite rule for child pages that passes more than one query var
- Extending page urls without getting a 404
- Permalink conflict with React Router in subfolder
- 404 on pretty permalinks when serving via HTTPS
- Add /blog prefix for all WordPress front end url
- Permalink structure has suddenly changed
- How to experiment with permalink structure on a select number of posts
- In a multisite, how can I get posts from one site and display their permalinks in another site?
- Why does page for hierarchical taxonomy parent term go 404?
- Custom permalink gives 404 error only in some pages
- Can I link to content dynamically from a page to a new page?
- Custom permalink for one category
- No Ones Been Able to Override my WordPress Rewrite Rule Issue!
- Remove index.php from URL (WP installed in subdirectory)
- Choose permalink on a per-post basis?
- Single.php not loading when permalink only contains date information
- WooCommerce product permalink changed
- Different Permastruck Between Ajax Request & Normal Request
- Imported posts using wrong domain name
- Is there a way to add slug to home_url on this function?
- Problem with multiple tags in URL
- Customized author slugs not working with get_author_posts_url method
- Custom WP permalink structure
- 404 error on second page load for child-pages
- Permalink structure as code in back-end?
- Internal Server Error every time I push up my WordPress Project to Heroku
- region selection
- Redirecting From An Old Permalink Structure
- WordPress custom permalinks, pages are now 404
- WordPress home page showing 404 error
- Include language variable in url
- Is it posible to translate a url prefix?
- AllowOveride All causes assetts and Admin Urls to 404
- Page permalinks are http but show up as https?
- WordPress 6.1.1 UTF8 Slug Limit Increase
- 301 Redirect posts to newly added categories
- How to have category/subcategory/posttitle/ permalinks?
- Permalink settings are stuck on https, will not update to http
- Duplicate Content Issue with WordPress Permalink Structure and Primary Categories