
The short answer: when you change the site’s address (a new domain, or from http to https), WordPress keeps the old address in thousands of places in the database: in page text, images, settings. Swapping them needs a tool that respects “serialized” data. A hand-made SQL REPLACE can break the site; use WP-CLI or a proper plugin, after a backup.
Why not by hand
| Method | Does it work? |
| Editing page by page | Only for very small sites. |
| An SQL REPLACE (phpMyAdmin) | No. Much data is stored with the length of the text written inside it (serialized). Swapping the text without fixing the length breaks the whole setting. |
| WP-CLI: wp search-replace | Yes. It understands serialized data and lets you see what would change first. |
| A search-and-replace plugin | Yes, if you have no SSH. Choose one that handles serialized data and has a “dry run”. |
With WP-CLI (SSH), step by step
|
|
|
|
|
| Leave the “guid” column as it is (hence --skip-columns=guid): GUIDs identify each post for feed readers and should not change. And do not run the swap without a backup: there is no “undo”. To change the site’s own address (not what is in the content), see Changing the WordPress site address. |
| The full case, from one domain to another, is in Moving WordPress to a new domain. If you do not have WP-CLI, see WP-CLI over SSH. |
|
Prefer that we do it with you? Open a ticket with the two addresses (the old and the new). Open a support ticket |
RECOMMENDED PRODUCT WordPress hosting One-click install, updates handled, and speed that holds up. from $6.59/mo (3-year plan, with coupon) See plans |
- 0 Users Found This Useful
Powered by WHMCompleteSolution











