πŸ”΅
WordPress

Change WordPress Site URL and Restore Site

πŸ“… 26 November 2026 ✏️ 26 November 2026 ⏱ 5 min leestijd

Changed the WordPress site URL and now unreachable? Four ways to correctly fix the URL and restore your site, plus search-and-replace tips.

An incorrectly set site URL is one of the most common reasons why a WordPress site suddenly becomes unreachable or ends up in a redirect loop. You can fix this by correctly setting the values of siteurl and home via the settings, wp-config.php, phpMyAdmin, or the WP Toolkit in Plesk. Pay attention to old addresses still present in the content: replace these with a tool that accounts for serialized data, otherwise the site may become damaged.

Why the site URL is incorrect

WordPress stores the main address of your site in two places: siteurl (where WordPress itself runs) and home (the address visitors see). These values become incorrect after moving to a different provider, changing from http to https, adding or removing www, or restoring a backup from a different location. As soon as these settings no longer match the actual domain, the site no longer loads correctly: stylesheets are missing, links point to the old address, or you get an endless redirect.

Settingswp-config.phpWP_HOME/SITEURLphpMyAdminwp_optionsWPToolkitCorrect site URL

Four ways to change the site URL

Depending on the situation, you can adjust the site URL in four different ways. Which method you choose depends on whether you can still access the dashboard.

1

Via the settings in the dashboard

Go to Settings β†’ General and adjust the WordPress Address (URL) and Site Address (URL) fields. This only works if you can still log in to the dashboard.

2

Via WP_HOME and WP_SITEURL in wp-config.php

Add the following lines above the “That’s all, stop editing!” line: define('WP_HOME','https://yourdomain.com'); and define('WP_SITEURL','https://yourdomain.com');. These values override the database settings and are ideal if you can no longer log in.

3

Via phpMyAdmin in the wp_options table

Open the wp_options table, find the rows with siteurl and home, and manually adjust the value (option_value) to the correct address. Useful if the dashboard no longer loads and you don’t want to use file access via wp-config.php.

4

Via the WP Toolkit in Plesk

Open the WP Toolkit for your installation, go to Settings, and change the domain or URL of the installation there. Plesk automatically adjusts siteurl and home, without you having to manually work in files or the database.

πŸ’‘ Tip: Always use the same format (with or without www, http or https) in all four places. A small discrepancy is often the cause of a new redirect loop.

Replacing old URLs in content

Adjusting siteurl and home only resolves the main address. Posts, pages, widget settings, and theme options often still contain references to the old domain. Some of this data is stored serialized: WordPress stores the length of a text along with the text itself. If you change the text with a regular search-and-replace query in phpMyAdmin, that length no longer matches and the data becomes corrupted, resulting in broken widgets or empty fields.

Therefore, use a search-and-replace tool that recognizes serialized data and automatically updates the length values. Such tools are available as a plugin or as a WP-CLI command. Always make a backup before running this, so you can revert if something goes wrong.

Site unreachable? Here’s how to fix it

If the site is unreachable after a change, first check whether siteurl and home exactly match the actual domain, including https and www. Then temporarily remove the WP_HOME and WP_SITEURL lines from wp-config.php if you added them, to test whether the database values are correct. Then clear the browser cache and any cache plugins, because an old redirect sometimes persists despite a correct setting.

If you can’t resolve it yourself, restore a recent daily backup from before the change was made. At Tandata, you’ll find the WP Toolkit and backup options directly in Plesk, and if in doubt, you can contact support via WhatsApp, ticket, or email, even at night.

Considering switching to a hosting provider where these kinds of technical issues aren’t just documented in a knowledge base but also resolved through real support? Check out the page about switching to Tandata or read more about web hosting with daily backups and free SSL.

Frequently Asked Questions

What is the difference between siteurl and home?

Siteurl is the address where the WordPress files run, home is the address visitors see in the browser. Usually they are the same, but with an installation in a subfolder they may differ.

Can I change the site URL without being able to access the dashboard?

Yes, via wp-config.php, phpMyAdmin, or the WP Toolkit in Plesk you can adjust the URL without logging into the WordPress dashboard.

Why doesn’t search-and-replace in phpMyAdmin always work?

Many settings are stored serialized with a fixed text length. A direct text replacement doesn’t match that length, causing the data to become corrupted. Use a tool that recognizes serialization.

How do I prevent this from happening again during a move?

After every migration or domain change, always immediately check siteurl and home, and perform the search-and-replace action for old URLs right away so links and widgets keep working.

What if the site still doesn’t load after all these steps?

Restore a recent backup from before the change, or contact support via WhatsApp, ticket, or email for help with restoring.

Conclusion

You can fix an incorrect site URL via the settings, wp-config.php, phpMyAdmin, or the WP Toolkit in Plesk, depending on whether you can still access the dashboard. Don’t forget to replace old URLs in the content with a tool that respects serialized data, and always make a backup before you start.

View web hosting β†’

Was dit artikel nuttig?