Themewaves
How-To

How to Change Web Address on WordPress

Learn how to change web address on WordPress using the dashboard, wp-config.php, or phpMyAdmin, then fix links and add domain redirects safely.

Editorial Team 7 min read
How to Change Web Address on WordPress

Understand the Two WordPress URLs

You can change your WordPress web address in three main ways. The safest choice is the admin dashboard when you can still sign in. You can also use the wp-config.php file or phpMyAdmin when the dashboard fails.

WordPress uses two URL fields for different jobs. The WordPress Address (URL) points to the folder that holds your WordPress files. The Site Address (URL) is the address visitors use to open your site.

These URLs often match. They can differ when WordPress sits in its own folder. For example, WordPress may live at example.com/wp. Visitors may still use example.com as the public site address.

  • Use the WordPress Address for the core file location.
  • Use the Site Address for the public page address.
  • Keep both fields correct before saving any change.

For a normal domain move, both fields usually need the new domain. The WordPress site URL guide explains these fields and other ways to edit them.

Why Change Your WordPress Web Address?

Site owners change a URL for several practical reasons. You may move from a temporary domain to a paid domain. You may also add or remove the www part of the address.

Some owners switch from HTTP to HTTPS after adding an SSL certificate. Others move WordPress from a subfolder to the main domain. Each change affects links, images, stylesheets, and login paths.

A domain change also affects search traffic. Set a permanent redirect from each old URL to its matching new URL. This sends visitors to the right page and helps search engines find the move.

Do not change the URL just to test a new domain. A wrong value can lock you out of the dashboard. It can also make the site load without images or styles.

Laptop and hosting access tools arranged for changing a WordPress site address
Reasons to update a site address

Change the URL in the Admin Dashboard

This method works best when your site loads and your login works. First, sign in to WordPress with an administrator account. Then open Settings and choose General.

  1. Find the WordPress Address (URL) field.
  2. Find the Site Address (URL) field.
  3. Enter the full new address in each needed field.
  4. Use HTTPS if your new site has a working SSL certificate.
  5. Click Save Changes.

Include the full scheme, such as https://. Do not add a final slash. A correct value looks like https://example.com.

WordPress may sign you out after the change. Sign in again with the same account. Open the home page and two or three posts to check the result.

This is the simplest answer to “how to change web address on WordPress.” It also reduces the risk of editing the wrong database row.

Change the Address with wp-config.php

Use this method when you cannot reach the dashboard. You need file access through hosting tools, SFTP, or SSH. Make a copy of the file before you edit it.

Open the wp-config.php file in your WordPress root folder. Add these lines above the line that says WordPress has stopped editing.

define( 'WP_HOME', 'https://example.com' );
define( 'WP_SITEURL', 'https://example.com' );

These values force WordPress to use the addresses you set. Replace the example domain with your real domain. Keep the quotes and punctuation in place.

Save the file, then clear your browser cache. Try the login page and the home page. Once access returns, check the General Settings screen before removing these lines.

The WordPress wp-config.php reference lists this file’s role and related settings. Do not edit this file with a rich text editor. Plain text editors prevent hidden formatting errors.

Laptop beside a server file folder for editing WordPress configuration settings
Edit WordPress configuration safely

Edit the URL in the Database with phpMyAdmin

Use phpMyAdmin when the dashboard and file method do not solve the problem. This tool changes the stored values in your WordPress database. A small mistake can damage the site, so work from a fresh backup.

Log in to your hosting panel and open phpMyAdmin. Select the database used by your site. If you do not know its name, check the DB_NAME value in wp-config.php.

  1. Open the table that ends in _options.
  2. Find the rows named siteurl and home.
  3. Choose Edit for the first row.
  4. Replace the old address with the full new address.
  5. Repeat the change for the second row.
  6. Save both rows and test the site.

Your table prefix may not be wp_. Look for a table such as abc_options instead. The row names still stay siteurl and home.

Use this method for a basic URL change only. Old links may remain inside post content, widgets, and plugin settings. A search-and-replace tool can update those links after you confirm the new site works.

Never replace every instance of the old domain with a blind SQL command. Some WordPress data uses stored arrays. A raw replacement can break that data.

Database backup drive and laptop used for a safe WordPress address update
Update the WordPress database URL

Back Up the Site Before You Change Anything

A URL change can affect files and database values at once. Create a full backup before you start. Save both the database and the WordPress files in a separate location.

A backup plugin can help with routine work. Your host may also offer a backup tool. Test that the backup exists and contains a usable database export.

  • Record the current WordPress and Site Address values.
  • Export the database before using phpMyAdmin.
  • Save wp-config.php before making file edits.
  • Note your old domain and every needed redirect.
  • Keep a second copy outside your hosting account.

Plan the change during a quiet traffic period. Keep your hosting login, SFTP details, and database access close by. This cuts the time needed to recover from a bad edit.

Do not delete the old site right away. Keep it available until redirects and key pages work on the new domain.

Fix Common Problems After a URL Change

The most common problem is a broken link or missing asset. Images may still point to the old domain. Menus and post links may also use old addresses.

Search the database for the old domain after the site works. Use a WordPress-safe search-and-replace tool. Check posts, pages, widgets, menus, and plugin settings.

You may also see a redirect loop after switching to HTTPS. Check your SSL setup and any redirect rules in your host panel. Make sure only one system controls the HTTP to HTTPS redirect.

If you cannot open the login page, use wp-config.php to set the correct values. You can also restore the database backup. Clear cache from your browser, caching plugin, and content delivery network.

  • Locked out: confirm both URL values and remove accidental spaces.
  • Missing styles: check HTTPS links and clear every cache.
  • Broken images: update old media links with a safe search tool.
  • Old domain still ranks: add one-to-one permanent redirects.
  • Redirect loop: review SSL and server redirect rules.

Test the home page, login page, contact form, menus, and five key posts. Check from a private browser window. This reveals issues that your logged-in session may hide.

Set Redirects When You Move Domains

A new domain needs a clear path from every old page. Add a permanent 301 redirect from the old URL to its matching new URL. Do not send every old page to the new home page.

Keep the same page paths where possible. For example, redirect oldsite.com/about to newsite.com/about. This helps users reach the page they expected.

Update your sitemap and any analytics settings after the move. Tell Google about the new domain in Search Console. Keep redirects active for at least several months.

Change the WordPress URL only after the new domain points to the right hosting account. A correct order prevents long outages and confusing error pages.

A Safe Order for Changing Your WordPress URL

Start with a backup, then choose the least risky method. The dashboard is best when it works. Use wp-config.php or phpMyAdmin when access problems block that route.

After the change, test key pages before updating every old link. Then add redirects and check the site from a logged-out browser. This process answers how to change your web address on WordPress without losing control of the site.

Take your time with the database step. One correct edit is safer than many rushed changes.

Step-by-step

  1. 01
    Create a full backup

    Back up your WordPress files and database. Save a second copy outside your hosting account.

  2. 02
    Choose a URL method

    Use General Settings when the dashboard works. Use wp-config.php or phpMyAdmin when access fails.

  3. 03
    Enter the new address

    Use the full HTTPS address in the needed URL fields. Do not add a final slash.

  4. 04
    Test the site

    Open the home page, login page, menus, forms, and key posts. Clear caches if pages look wrong.

  5. 05
    Update old links

    Search for the old domain and replace links with a WordPress-safe tool. Check images and widgets too.

  6. 06
    Add permanent redirects

    Redirect each old URL to its matching new URL. Keep the old domain active during the move.

Frequently asked questions

How do I change the web address on WordPress?
Open Settings, then General. Change the WordPress Address and Site Address fields, then save the new full URL.
What is the difference between WordPress Address and Site Address?
The WordPress Address points to the folder holding WordPress files. The Site Address is the public URL visitors use.
Should I back up WordPress before changing the URL?
Yes. Back up your database and files first. A wrong URL can break links or block dashboard access.
How do I change a WordPress URL in phpMyAdmin?
Edit the siteurl and home rows in the options table. Use the full new URL, then save both rows.
Do I need redirects after changing my WordPress domain?
Add permanent 301 redirects from each old page to its matching new page. Keep the old domain active while users and search engines switch.
How can I change the WordPress URL when I cannot log in?
Add WP_HOME and WP_SITEURL values in wp-config.php. This can restore access when the dashboard will not open.
change wordpress URLWordPress address settingssite address settingsedit WordPress URLURL redirection guidephpMyAdmin database editsfix broken WordPress links

Related reading