You can search and replace every occurence of “http://example.com/subdir” in the database with “http://example.com“.
If you’re comfortable with WP-CLI, there is command for that:
$ wp search-replace 'http://example.com/subdir' 'http://example.com'
If not, you can use some plugin for that. Some possible would be:
Related Posts:
- Two domain site: Link base URLs point to wrong domain
- Redirecting to old domain after migration
- How to remove /index.php/ from URL’s
- Run WordPress frontend and backend in different domains
- How to remove “http://” When Echoing URL?
- Change logo url link
- Change homepage url
- get_site_url is not returning anything?
- How can I change all links on pages to point to a different domain from where the site is hosted?
- Remove site root trailing slash
- URL parsing – what is it?
- Changing my site url from azure.net to custom domain
- Remove / from www.example.com/ [closed]
- How do I write the link from front-page.php to home.php?
- how to make URL link query string
- Avoid the removal of “https:” from URLs
- Confusion about Site url and directory
- WordPress get parameter ‘unapproved’ and ‘moderation-hash’
- Changing the website URL to the root folder
- Renamed my website (URL) – how do I rename all within-page links to the old URL?
- Showing my server ip in source code for several links not for all links
- Cannot access WordPress website from external IP while internally it is working properly [closed]
- DNS – Change WordPress Site Name?
- Alternatives to site_url() and get_template_directory_uri()
- Relative URLs within site
- What is the best way to revert to www version of domain name?
- Image not showing up in media loader success area – followup
- Changing siteurl in the database not working
- How to make a seo friendly URL of 2 different pages with same words
- No https in url when writing links like:
- Why my URL has an unknown character string?
- Create 600 links to separate files on google drive
- In-page link works in Firefox but not in Chrome
- Let WordPress to go opening an external URL
- Why am I seeing ‘yes’ and ‘no’ in URLs crawled by Xenu?
- Making a site URL
- Typing local WordPress URL works, but clicking the same link does not
- WordPress rewrites my link with custom URL scheme to http(s)
- Can’t change url because site address is greyed out
- How to Convert Parent Page’s URL in Singular Name format when Child page is open
- Prevent “main” WPMU site_url() being returned in functions
- Getting the Site URL Including the Front Base
- Remove All Query Arg
- Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page
- How to set global variable in functions.php
- Can’t login after my site was moved to a new server
- How to inject custom url path for page ?
- Adding a hook to ‘parse_request’ so that siteurl/pagename/xyz ignores “xyz”
- How to have numeric URLs in Posts and Pages
- Generate one time URL
- In Settings>>General I am missing some fields
- Do I need to use the esc_html() function on hard coded links?
- Adding target and _blank as it’s value to the allowedtags
- Is ‘name’ a reserved word in URL’s?
- Handling URLs in WordPress application
- Components used in Themes and Plugins: How to get file URL?
- Site URL always in front of other URLs
- Easiest way to simulate WordPress’s URL resolution to retrieve post ID, etc?
- Insert “javascript:void(0);” into URL
- Allow Chinese character on post URL slug
- How to handle this URL Structure. Keep getting “page not found”
- Custom url in wordpress
- WP URL /icons returns 403 forbidden error
- Get root folder without domain
- wordpress.com website url structure [closed]
- HTTP 403 Error when passing parameters to URL
- Get arguments from URL
- How to remove my website link when adding a link?
- Edit permalink for certain pages
- How to make pages slug have priority over any category
- Website Address Keep redirect to website after migration attempt
- Random string added end of the url blog page wordpress [closed]
- Custom HTML title based on URL parameter
- Can’t change the wordpress site url
- Rewrite Most WordPress URLs
- Using WordPress for a site’s static marketing pages and blog at different URLs
- Need to check if user is on a particular page
- How to set path to the image instead of alt in media.php?
- Changing url of author page
- How to get previous and Next Post Url in the_post_navigation
- Multisite problem with unexisting paths to CSS etc
- Encode URL for WhatsApp “click to chat” without loosing accented characters
- append currency to URL
- URLs for (MultiSite) link images are always relative
- Locked myself out of WordPress because I changed my URL and computer shut down
- Cant access my wordpress.org locally
- I changed the URL [closed]
- WP site homepage displays url link at beginning of each featured post
- Unable to login after changing WordPress site url
- Why is my WordPress URL shortened
- Difference and usage of uri (e.g. get_directory_uri) and absolute path (e.g. get_directory)
- How to get the correct URL on my wordpress site?
- How to redirect WP post with a specific word in the URL
- Avoid too long words in a post title, post content or comment but only if its not a url
- Change URL to filter posts
- How to change Ugly link?
- Accidentally changed the url
- What purpose does /embed/ URL have and how to avoid SEO problems?
- Unable to Retrieve Query Parameters Passed in URL
- Allow question marks (?) in WordPress permalinks