By
Noiz / 19th October 2026 | 5 min
After a move to a new domain, a switch from http to https or a change of business name, the old value sits in hundreds of places in your WordPress database. This guide shows you how to replace it everywhere in one pass without breaking your settings: a backup, a dry run that changes nothing, the real run, then checks. You do the job from the WordPress dashboard with a free plugin.
Last reviewed: 19 October 2026, against the current WordPress release. This guide is written for Noiz hosting and is kept current against WordPress. It complements, and does not replace, the official WordPress documentation linked below.
Official Documentation Reference
Why a Plain Database Replace Breaks WordPress
WordPress stores many settings (widgets, theme options, page-builder layouts, menus) as serialised data, a format that records the length of every piece of text inside it. The address http://example.com is stored as s:18:"http://example.com";, where 18 is its length. Replace it with https://example.co.za using a plain SQL query in phpMyAdmin and the text grows, the 18 does not, and WordPress can no longer read the setting. Nothing fails at once; a widget or a layout disappears later.
The plugin below unpacks each setting, replaces the text and packs it again with the right length. That is why this guide uses it instead of a plain SQL query.
Before You Start
- The site already works at its new address. If you have just moved to Noiz, follow How to Migrate a WordPress Site to Noiz Hosting first, including the WordPress Address and Site Address under Settings > General. This guide cleans up everything else.
- You have a database backup taken now. A replace touches every table and has no undo. Export the database with How to Export a Database Backup in Plesk and download the file.
- You know the exact old and new values. Copy them from a page source rather than typing them, including
http or https, www or not, and no trailing slash. In these examples old-example.com and example.co.za stand for your own domains.
- Administrator access to WordPress, to install a plugin.
Step 1: Do a Dry Run
A dry run reports what would change and changes nothing. Always do one first.
- Go to Plugins > Add New Plugin, search for Better Search Replace, then install and activate it.
- Open Tools > Better Search Replace.
- Enter the old value in Search for and the new value in Replace with.
- Under Select tables, select all tables.
- Leave Replace GUIDs unticked and Run as dry run ticked, and select Run Search/Replace.
- Read the report of how many changes it would make in each table.
Step 2: Check the Report Before You Run It
- Zero matches means the old value is not stored exactly as you typed it. Check
http against https, www, and a trailing slash.
- Matches in tables you did not expect, such as a plugin's log table, are usually harmless, but read their names before you go on.
- Leave the
guid column alone. Each post's GUID is a permanent identifier that feed readers use, and WordPress's own migration guide says never to change it: if it changes, every old post appears as new to your subscribers. Better Search Replace skips it unless you tick Replace GUIDs, so leave that box empty.
Step 3: Run the Replacement
Untick Run as dry run and select Run Search/Replace again.
Then repeat Steps 1 to 3 for each other form of the old value that exists, for example https://www.old-example.com and http://old-example.com. Replace the most specific form first.
Step 4: Check the Site
- Clear any caching plugin's cache, and your browser's.
- Go to Settings > Permalinks and select Save Changes without changing anything. This refreshes WordPress's address rules.
- Open the home page, a post, a page built with your page builder, the menus and the widgets. These are where serialised settings live.
- View the page source and search for the old value. Anything left is usually in a cache or a form of the address you have not replaced yet.
- Deactivate and delete Better Search Replace when you are done. A plugin you no longer use is one more thing to keep updated.
Troubleshooting
- The report shows zero replacements: the search value does not match what is stored. Copy it from the page source, including the protocol and
www.
- A widget, menu or layout is empty after a replace: a plain SQL replace was used at some point, or a plugin stores its data in a format the tool cannot read. Import the database backup you took in Plesk and repeat the job with the plugin as described here.
- Feed subscribers see every old post as new: the
guid column was changed. Restore the database backup and run again with Replace GUIDs unticked.
- You are sent back to the old domain and cannot log in: the WordPress Address and Site Address still hold the old domain. Follow the troubleshooting section of How to Migrate a WordPress Site to Noiz Hosting.
Let Noiz Keep the Site Healthy
A replace is one step in a move. Once the site is on its new address, WordPress Care keeps it current and recoverable. If you would rather not do the replace yourself, get in touch.