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
- WordPress homepage shows default theme after migration – logged-out users see different content
- Change media item permalink
- Why is “/page/2/” not working?
- Is the permalink structure /%post_id%/%postname% faster or slower than just /%postname%?
- How can I force WordPress to redirect to canonical permalinks?
- Why would Numeric permalinks work, but %postname% won’t?
- Passing variables through permalink structure
- Remove subfolders from URL
- htaccess or redirect to cloak portion of a link?
- WordPress Permalinks %postname% for RSS2 Feed URL
- wordpress permalinks tweeks
- generate custom permalink based on a custom field
- How to get wordpress link to fully evaluate when coming from facebook
- Is using %postname% for permalinks really that bad for performance?
- Getting links to work the same on development and production
- Change author slug and functionality
- Setting up two separate blogs while using WordPress as a CMS
- Changes to .htaccess not updating the file (old rules still take effect)
- Force pretty permalinks?
- WordPress Permalinks & Nginx Rewrite Rule Not Working
- Page and Category With Same Slug – Looking To Silo Website
- Override category permalink to match old non-WordPress links?
- filtering special chars from post slug
- Need to add trailing slash to all internal links relative and absolute
- How to change old permalink?
- Empty permalinks settings in .htaccess
- Rewriting single post url; add_rewrite_rule problem?
- WordPress permalink prefix
- Hierarchy of Subcategories on Permalink (bug?)
- curl problem or permalinks
- Multiple permalinks
- RSS feed link on archives page not working
- Order custom post type posts by custom field with pretty URL
- Show category name in the post URL only for specific categories
- custom query var NOT working on a plain permalink: http://10.8.10.9/?page_id=1774/?location=968&floor=1
- How to flush Global query variables in wordpress?
- How to disable permalinks to some custom post content?
- post permalinks with dot in url don’t resolve to correct page template
- How to add a base/front slug/url to specific post types?
- How to use page jumps to top of banner and page title?
- Permalinks problem woocommerce no separating slash between categories
- how to get permalink
- Change permalink to attachment
- Main blog page works but title says Page not found
- How to translate “Permanent link to” text
- Permalinks by Post Name Are Not Working
- WordPress permalink change causes all incoming links to give 404 errors
- Change url of page according to my requirements in wordpress
- I use wordpress wp-page navi
- Multiple Taxonomy Items for Separate URLs
- MySQL-inserted custom taxonomy term lead to 404, flush rewrites doesn’t help
- URL gives 404 error of my subfolder site when i change permalink
- home page slug editor missing from WordPress
- Permalink issue with WordPress Site at domain root and another WordPress Site in a Subfolder
- Custom optional parameter in page URL
- Posts containing a specific tag and a category in one permalink
- Custom permalink question
- How to search for images and get it’s link?
- Post redirected to page with same name but DIFFERENT permalink
- Moved WordPress to other folder (Windows) WAMP = 403 Forbidden
- permalink to single page
- changing permalink gives 404 error for old links
- single.php being ignored, going straight to attachment.php
- Uppercase vs. Lowercase page slugs
- How do you intercept the page requests in WordPress?
- Pretty Permalink for Search Queries Not Working
- Automatically prepending ‘#’ to slug in child page permalinks
- WooCommerce product permalinks
- How to update permalink on the fly?
- Rename category part the permalink without .htaccess
- Tag URLs load a single post
- get_permalink to attachment not working
- Performance and styles not working fine after changing permalink structure
- Getting the terms from “Beautiful Taxonomy Filters” Results ot Integrate into “Ajax Load More”
- Why is wordpress permalink path wrong for single blog posts?
- I changed rightly the permalinks but I get empty pages in the final posts
- Different template fallback when changing permalinks
- Creating custom permalink tags in the database
- Pages resolve at different URLs (different capitalizations)
- ‘Unsupported Operand Types’ error stemming from taxonomy re-writes with PHP 8.1
- Change default URL (or permalinks) in the back-end
- Custom permalinks for post formats
- Adding tag slug to post permalink
- changed permalink structure and now ajax functions are broken
- Changing the URL slug causes redirecting to homepage, or showing 404 or missing lang_code issue