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)
- Custom plugin route in WordPress
- Why is ?doing_wp_cron being appended to my URLs
- Change default URL path (/blog/) of blog posts
- How to deal with WordPress on localhost
- How to convert the file path to a URL of the same file?
- Why is WordPress saving full-urls to the database?
- How to append a URL parameter to all outbound URLs
- Force the Website URL to Include “www” and to be Upper Case?
- WordPress and $_GET Params
- Why WP encodes UNICODE (UTF8) containing urls? Any drawbacks of UNICODE url?
- Unable to load static front page on home url
- Force home page to be https?
- add_query_arg() One Key with multiple values
- Check what is at URI (post, archive, etc…)
- How to rewrite url wordpress?
- Rewrite WordPress Standard Feed URL – /feed/ to feed.xml
- Set a custom URL for image in the Media Library?
- How to edit URL Slug?
- Publish Post when URL is available else reschedule the post in wordpress [duplicate]
- Change url links on members loops in buddypress
- Find file url in post content and add it to media library
- rewrite taxonomy-{taxonomy}-{term}.php terms
- How to generate a list of all urls
- Multiple URLs with Numbers
- hijacking home_url for root relative paths
- How to properly print a 404 error without redirecton? (i.e. keeping the current URL)
- Can anybody provide me with a function to generate slugs?
- Is there RELATIVE_PATH, like ABSPATH
- Linking to pages/posts within the site
- Accessing WordPress using “localhost” and local ip at the same time
- Porting site URLs to new host but with same domain name [closed]
- My #id is not showing in the url when the user clicks on the anchor tag
- Is there a way to test if a URL is part of the current blog?
- An anchor name (id name) in the address bar
- get_template_directory() returns wrong address on VPS
- How do I allow http/ftp access to files I have uploaded?
- Redirecting URL with Twitter Button API Not Working
- Need help changing back the correct wordpress url
- Adding Parent Categories and keep current URLs
- Different url to same page (with dynamic content)
- WordPress option com_jce should not work
- Too many redirects (ERR_TOO_MANY_REDIRECTS) only on one page
- How to bulk Update URLs to new values?
- WordPress Still Requesting Old Url
- Broken Images and Style
- How to generate expiring URL of the page?
- Add more than one query parameter onto wordpress url
- i1.wp.com url problem (Jetpack not installed)
- Change dynamically URL to SEO friendly via .htaccess?
- incorrect url in Snippet editor
- Get userdata from url
- How to change URL of my pages?
- Modify the WordPress URL
- Duplicate pages with ?s parameter
- Populate Website URL at registration time
- WordPress Update Links
- How to use query string in URL to display content on the wordpress page
- redirect word-press page with page values
- help me remove this additional parameter in url
- Lost WordPress website access after changing URL [closed]
- How to run Wiki on the same host as WordPress and not get 404 errors when browsing to Wiki?
- What purpose does /embed/ URL have and how to avoid SEO problems?