---
title: How do I change my WordPress site URL?
description: Change the site address of a WordPress install from the dashboard, or from phpMyAdmin in cPanel when the change has locked you out.
date: 2026-10-13
updated: 2026-10-13
tags: [wordpress, phpmyadmin]
url: "https://drivenhost.com/kb/kb-change-wordpress-site-url"
author: DrivenHost
---

When you move a WordPress site to a new domain, switch it from a temporary address to the real one, or bring a site across from your previous host, WordPress keeps pointing at the old address until you tell it otherwise. Symptoms include pages that redirect back to the old domain, broken images, and a login screen you can never get past.

This guide covers the two ways to change the address: from inside WordPress, and from the database when WordPress will not let you in. For the second method you will need to log in to cPanel.

## Change the address from the WordPress dashboard

Use this method when you can still log in to WordPress at the current address.

1. Log in to your WordPress dashboard.
2. Go to Settings, then General.
3. Set WordPress Address (URL) to the address where the WordPress files live, and Site Address (URL) to the address visitors should type.
4. For most sites these two are the same. They differ only when WordPress is installed in a subfolder but served from the root.
5. Include `https://` if you have an SSL certificate installed, and leave off the trailing slash.
6. Click Save Changes.

WordPress logs you out as soon as it saves, because your session belongs to the old address. Log back in at the new one.

## Change the address in phpMyAdmin

Use this method if the fields are greyed out, or if you have already changed the domain and can no longer reach the login screen.

1. In cPanel, open phpMyAdmin under the Databases section.
2. In the left column, select the database your site uses. If you have several and are not sure which, open `wp-config.php` in File Manager and read the `DB_NAME` value.
3. Open the `wp_options` table. Your prefix may differ, so look for a table ending in `_options`.
4. Find the rows named `siteurl` and `home`. They are usually the first two rows.
5. Edit each one and set `option_value` to the new address, then save.

Reload your site in a private browsing window. Browsers cache redirects from the old address, so a normal window may keep sending you back for a while.

## Update links inside your content

Changing the two settings above does not rewrite addresses stored in posts, pages, widgets, or theme settings. Images and internal links may still point at the old domain.

Most people fix this with a search and replace tool that understands serialized data, such as the one built into many migration plugins. Do not run a plain SQL find and replace across the whole database, as it corrupts serialized values. WordPress.org documents the options at [Changing The Site URL](https://wordpress.org/documentation/article/changing-the-site-url/).

## If it didn't work

- **The site still loads the old domain.** Clear your browser cache or test in a private window, and flush any caching or CDN plugin you have active.
- **You see a redirect loop.** `siteurl` and `home` probably disagree, or one uses `https://` while the certificate covers only `http://`. Check the SSL/TLS Status page in cPanel and make both values match.
- **The new domain does not resolve at all.** This is a DNS problem rather than a WordPress one. Confirm the domain points at your hosting account before changing anything else.

If you are still stuck after trying these, contact us at [/support](/support) with the domain name and we will take a look.
