
How to Replace HTTP URLs with HTTPS in WordPress
Replace old HTTP URLs after installing SSL, protect serialized data, use a dry run, and verify redirects and mixed-content results.
Sooner or later something has to change across an entire WordPress database at once — a domain after a migration, http to https across thousands of links, a product name, a phone number in a footer widget. Doing it by hand is impossible and doing it with a plain SQL query is dangerous.
The danger has a specific name: serialized data. WordPress stores many settings as PHP arrays with the length of each string recorded alongside it. Replace a ten-character string with a twelve-character one using a naive query and the recorded length is now wrong, and whatever read that option stops working — often a page builder’s entire layout, silently, days later.
These guides cover doing it safely. Running a dry run first so you can see how many rows would change before any of them do. Scoping a replacement to the tables that need it rather than the whole database. Handling the serialized fields correctly. And the two most common jobs, domain changes after a move and http to https across old content.
There is also an article on undoing one, which is the reason the dry run and the export come first.
If you take one habit from this module, take the dry run. It costs a minute and it turns an irreversible operation into a reviewable one.

Replace old HTTP URLs after installing SSL, protect serialized data, use a dry run, and verify redirects and mixed-content results.

Recover from a bad WordPress search-and-replace without overwriting later edits, orders, or legitimate values that already used the replacement text.

Replace approved wording across WordPress posts and pages without altering quotations, slugs, code, transactional records, or language-specific grammar.

Change a WordPress domain without losing admin access or breaking serialized data, cookies, multisite mappings, callbacks, or redirects.

Use a WordPress search-and-replace dry run to review scope, samples, and exclusions before changing data, then repeat it against the current database before the approved write.

Run WordPress search and replace without corrupting serialized options, widgets, or plugin data. Preview the scope, verify decoded values, and keep a usable rollback.

Replace old WordPress URLs after a migration without damaging serialized data, GUIDs, multisite records, or third-party integrations.