When editing content in the content editor WordPress hardcodes the current URL that is being used to access the WordPress admin. This is usually found in link href
and image src
. There are several plugins or tools (like wp-cli
) that can assist you in finding and replacing the url between environments.
You will likely want to your search to look something like:
Old
//site1.com
New
//site2.com
NO TRAILING SLASH in the search! Don’t use the protocol if you are not trying to switch/normalize urls from http
to https
, same goes for www
domain variants.
If you access the site at several different domains during the development cycle you may want to look into tools like the WordPress plugin WP Migrate DB Pro
that find and replace while migrating between environments or manually on the current environment.
Related Posts:
- After server migration only the homepage works
- URL rewrite based on a custom field value
- WordPress Links Not Working After Migration
- Migrating WordPress blog to New Webhosts, something is adding a # and gibberish
- Point domain to different webhost’s subdirectory wordpress
- Migrated from Windows to Linux. Any bulk methods for fixing case sensitivity?
- Visiting posts results in 404 errors after host migration
- After cloning WP do a subdirectory, I can’t access it
- How to separate an overgrown blog into sub-blogs – without breaking existing inbound links?
- How to change permalink structure and keep permalinks for old posts
- Links after changing hosting and domain
- Latin character conversion
- Permalinks not working after Migration – AllowOverride All, htaccess set
- After I migrated a website for WordPress – Saved changes in wordpress settings >> permalinks. Homepage only working, links not working
- After migration works only first page
- Passing and retrieving query vars in wordpress
- Get the current page URL (including pagination)
- What is the difference between get_post_permalink and get_permalink?
- WordPress matching URLs with trailing tildes
- Setting up WordPress with Custom Permalinks and no .htaccess File?
- How to use relative links on my pages?
- Why does /wp-json/ not work on the “plain” permalink structure?
- Custom Permalink: /year/month/post-goes-here/?
- Menu Link Redirect Based on Username or User ID
- How to get the post id from a permalink?
- Redirect short-form URL to long-form URL (post_id to post_id + post_name)
- Does a parent page’s post_title have to appear in a child page permalink?
- Enable Minify in W3Total Cache using NGINX [closed]
- Stop redirecting to posts not in a category / duplicate slugs
- How to make variables in URL look like the permalink structure?
- Why I can’t change the permalink of this page?
- Permalinks changed with WordPress 4.9
- Why does chrome keep downloading a file instead of running the site?
- How can I add a page’s ID to its permalink using WP_Rewrite?
- Re-write specific custom post type category URL to go to another page
- Is it possible to keep all special letters for foreign languages in slug as in title?
- index.php is always displayed before any file on the URL
- How do I fix permalink and media library issues on a LEMP stack?
- Non latin post slug truncate
- How to find the post_id of a post on a wordpress blog that uses pretty URLs?
- Dynamic Template file for subpage
- How to 301 redirect from one url to another properly
- How do I change the permalink of a scheduled post so that it can be linked to?
- WPML Permalink missing language slug
- How to remove /year/month from uploaded medias?
- Htaccess https 301 problem
- Advanced author permalinks
- Format HTTP links
- Permalinks on post is working, on pages 404 error
- Change directory url to be same as page permalink?
- When do i need to get permalink structure of a specific post?
- implement separate templates for 1 post type
- WordPress author.php template does not work with custom permalink structure! Help!
- Adding URL prefix for foreign language support
- LAMP WordPress Permalinks 404 error
- Links in post content don’t work on home page
- Remove all stop words from old permalinks
- Arabic permalink redirect to home page
- Changing permalink settings causes 404
- 404 error on all pages but custom post types are working OK
- How can I see a list of all pages my WordPress site has generated?
- Can I change the URL structure for a CPT only?
- Make a post inaccessible without a unique ID in the URL
- index.php in URL
- archive by year and category: permalink support doesn’t work on pagination
- Empty the_excerpt() broke the_permalink() under him?
- Code snippet to add filter pre_post_link to change Media URL (post_type attachment permalink/slug)
- Permalink not changing according to post type
- iFrame permalinks on WordPress
- Change permalink structure in all sites of a multisite
- Custom permalink structure with a prefix just for posts
- Changing permalink stops me from creating webpages
- Make query parameter an endpoint
- 404 page not found – Yet open admin page it works
- How can I have a page’s permalink include my custom post type’s slug?
- Added a prefix in URL permalink structure but the old structure still working!
- Problem with permalinks
- Find internal links to post
- “Undefined” added to page content after google Adwords click
- create user’s view profile link with username
- Image upload ruined my links
- How to rewrite a folder in WordPress?
- The Permalink doesn’t work after the foreach ended
- Force/Limit the post/page slug to accept only url friendly characters
- Make Permalinks have a custom format?
- Permalinks setting raises 500.0 error
- permalinks of subcategory and posts
- Define a Permalink Structure by Post and Page
- Tag search not working after permalink structure change
- After changing permalink settings, everything works fine except for the two most recent posts
- permalink repeated
- .htaccess not working in WordPress
- Incorporate single WordPress page into an existing static website [duplicate]
- Custom permalink to make a page respond properly
- How to avoid duplicate Url for the home page
- WordPress 3.1 problem, getting 404
- Display a custom slug in URL depending on user variable
- Removing parent page in URL for one page
- htaccess strip url
- Problems loading stylesheet and permalinks after rebooting