Permalink settings are handled in wp-admin under Settings > Permalinks. You can select the “Post name” radio button and save the changes, and your permalinks will be updated.
If this is a live indexed site, you may want to set up redirects for search engines and visitors – that’s the only part that would require custom code.
Related Posts:
- Pretty permalinks for search results with extra query var
- Does WordPress automatically do 301 redirect if I change permalink
- Broken wordpress permalinks on pages only
- Post being redirected to attachment post
- Without index.php in permalinks I get 404 across site
- Changing Permalinks to a Custom Permalink causes a 404 Error [no matter what I do]
- Change website URL without breaking links or images? WP 3.3
- Redirect user if it’s not logged in
- Random Alphanumeric Key URLs
- How to get this JavaScript working with get_permalink
- Add a css class to a taxonomy permalink
- Search result permalink
- Permalinks Structure and 404 Question
- Change of permalink structure – redirects in htaccess breaks the archive links
- Change permalinks with ACF values
- Changing Custom Permalink with Filter
- WordPress installation in subfolder not working with nginx
- 404 with post name permalinks
- Should there be a trailing slash in the permalink
- Link to external URL
- Confusion about how a URL is being parsed
- Clean install – Changing permalinks in twentyeleven give 404
- Woocommerce Product Attribute Permalink doesn’t work?
- Adding page links to content that automatically convert to pretty permalinks?
- WPML get permalink to the translated post from the original post
- Add custom post type name in term link?
- Can I create permalinks like this: /%post_type%/%postname%/
- WordPress post-name permalink redirects to site.com
- WordPress Pages Redirecting to Root with WordPress Multisite (Sub-Directory)
- get_permalink() is not working after published
- WordPress add_rewrite_tag working for Posts, but not working for Pages
- Woocommerce subcategory 404
- WordPress always returning 404 page for a specific url
- WordPress can generate numeric permalinks, which then 404
- WordPress Automatic Update to 3.9.1 breaks Permalinks [closed]
- Static Text in Permalink
- Pre-populate Slug / Permalink with URL
- Permalink changes gives me 404 [closed]
- How do I make 301 redirection from `/%post_id%/` to `/%postname%/`?
- Allow Permalinks to Work with and without Hyphens
- WordPress permlink is not working
- Using one slug/post-name for multiple pages
- Problems with rewrite rule
- How to Custom Edit Post Title & Permalink Slug?
- Problem with parent page slug only in WordPress admin
- Gutenberg output URL to post from attribute with post ID
- Broken wordpress site, non-working links and no access to wp-admin page
- Direct link to post when multiple categories are selected
- Add category into post permalink
- Add post overwriting permalink from previous post in 4.6
- Make custom post available under main domain directly?
- Getting an ID from a URL, why can WP do this itself, but none of of the functions provided get it right?
- Custom permalink structure with %postname% in front of domain name
- Add variables to all permalinks in site
- Big arabic permalinks not work
- Fix 404 error after changing permalink structure
- How can I set up a secondary permalink structure?
- External PHP file & Pretty Permalink
- What is the right way to clean up $title before wp_insert_post?
- How to get links to user and tag by its name?
- Help me fix these crazy attachment page URLs (rewrite?)
- Unable to rename permalink
- How to Use metada Value in Url and is it possible? [duplicate]
- Custom child page permalink
- How to allow slash(/) on page url
- Safest way to create a custom permalink
- How do I structure my permalinks in WordPress?
- Parent/Child Categories Permalinks
- WordPress wildcard route to page
- An excluded ‘ghost’ page is crashing my permalink
- WordPress Attachment Page URL Rewrite!
- Customize URL for specific tags archive
- Yoast and permalink troubleshooting
- Permalink Issue | Too many redirects
- WordPress project redirecting to a blank index.php when i use custom templates
- Parent/Child Relationships with Multisites?
- Custom Permlinks work, regular page permalinks don’t
- How to redirect from old standard wordpress permalink structure to new custom one
- When is a good time to reset permalinks?
- wp_dropdown_categories links 404
- Permalink problem ( Blog posts vs custom post types)
- Search and replace post URL’s on page output?
- Two urls for one website
- Added incorrect rewrite rule now getting an error
- WordPress Pagination Not Working After Transfer from Localhost
- Accidentally changed the permalink structure
- Keep wordpress from modifying my permalinks
- get_permalink wrongfully returns only year and month and not all the link
- Link to most recent child page
- Permalink Issue – Funny & Weird
- customize urls displayed by previous_post_link and next_post_link
- Pagination is not working, how to trace it properly?
- Problem when i configure permalink
- Files placed in directory with wordpress 404
- wordpress home is gone
- how to create several url aliases for a page
- Permalinks Won’t Work
- Post URL not working according to permalink setting
- Strip category base from URL?
- Settings > Permalinks – mod_rewrite ineffective if expression not preceded by /index.php/