Complete Guide: How to Change the URL in WordPress

How to change url in WordPress

Have you ever had to change the URL of a WordPress post or page? This can be helpful to improve the site’s search engine optimization (SEO), make the URL more user-friendly, and reflect changes to the page’s content.

Sometimes, we come up with a better URL after publishing our post or page, which leaves us wondering: what should we do next?

If you don’t properly adjust your SEO settings, you could end up with 404 errors that can harm your search engine optimization. But don’t worry; we’ll guide you about how to change the URL in WordPress.

The following article explains how you can change any page’s URL within your WordPress site in just a few simple steps. The process is straightforward, even if you’re new to WordPress themes or don’t have much experience with website development.

The article provides you with the knowledge of how to change the URL of a page on your WordPress site and make it easier for users to find and navigate to the page.

How Do WordPress Addresses and Site Addresses Differ?


Site (URL) and WordPress URL are two settings in the WordPress configuration that determine the URL of your WordPress site.

On your web server, WordPress files are stored at the WordPress (URL). This is the URL you use to access the WordPress admin area (e.g.,

It is the public-facing URL of your WordPress site, which is the URL visitors will use to access your site (e.g.,

The WordPress URL and Site (URL) will be the same and will simply be the domain name of your WordPress site (e.g.,

However, in some cases, you may want to use a different URL for the WordPress admin area, where the WordPress (URL) and Site (URL) will be different.

Suppose you wish to use a subdomain (e.g., for the WordPress admin area while using the main domain ( for the public-facing site.

Overall, the difference between a WordPress URL and a Site URL is that the WordPress (URL) is the location of the WordPress files on the web server, while the Site (URL) is the public-facing URL of the WordPress site.

Reasons to Change the URL on a WordPress Site

WordPress URLs may need to be changed for the following reasons.

  • When moving your site from a local to a live server, you might need to update site URLs.
  • Changing hosts will require changing the URL of every page on the site.
  • If you move WordPress from HTTP to HTTPS, it must also be changed.
  • To improve the site’s search engine optimization (SEO) by using a URL that is more descriptive and relevant to the page’s content. This can help the page rank higher in search results and attract more traffic from search engines.
  • To make the URL more user-friendly so that it is easier for visitors to remember and navigate to the page. It can improve the overall user experience and make visitors more likely to return to the site.
  • Consolidate multiple URLs for the same page into a single URL, which can help reduce duplicate content and improve the overall user experience.
  • A page may be updated to reflect a change in its content or focus, for example, if it previously covered one topic but now covers another.

Other than that, you may have to change the WordPress address settings if you’re getting too many redirect errors in WordPress or troubleshooting another WordPress issue.

How to Change the URL of a WordPress Site

If you’re new to WordPress, the following methods will help you change your site’s URL in just a few steps.

Method 1: Admin Dashboard: Change WordPress URL

You can change the URL of a page on your WordPress site through the admin dashboard by following these steps:

Log in to the WordPress admin area ( using your username and password.


Using the left menu, click on “Pages” to view a list of all the pages on your site. Click the title of the page whose URL you want to change.


In the editor, tap the “Permalink” button below the page’s title. It will open a dialogue box where you can edit the URL of the page.


In the “Edit Slug” field, enter the URL that will be used for the page. Make sure to use only lowercase letters, numbers, and dashes, and avoid using spaces or special characters.


By clicking the “OK” button, you will save your new URL. Preview the page to ensure the new URL is working correctly, and then press the “Publish” button to make the changes live on your site.


That’s it. You have successfully changed the URL of a page on your site using the admin dashboard.

Method 2: Change the WordPress URL in the Database

To change the WordPress URL using the database, you will need to follow these steps:

Log in to your website using your administrator credentials. On the left menu, click “Tools” and select “PHPMyAdmin” from the options.


In the PHPMyAdmin interface, select the database your WordPress website uses from the menu on the left.


In the main window, open the “wp_options” table and select the “Edit” option in the top menu.


In the “option_name” field, search for “siteurl” and then press the “Edit” button next to it. In the “option_value” field, enter your WordPress website’s new URL and hit “Go” to save changes.


Once the changes have been saved, you can log out of PHPMyAdmin and log back into your website using the new URL.

You should note that changing your WordPress URL using the database can be a complex process, and it is recommended that you have a backup of your database before making any changes.

If you are unsure how to change the WordPress URL using the database, it is best to seek the help of a professional web developer.

Method 3: Change the WordPress URL with wp_config.php

To change the WordPress URL using the wp_config file, edit the file as follows:


Replace with the new URL selected for WordPress site.

Note: Before making any changes to your site, be sure to back up your database and files. Whenever something goes wrong, you can restore it.

Here are the steps to follow:

Access your WordPress site’s files using an FTP client or a file manager in your hosting control panel. If you don’t have an FTP client, go to your dashboard from C-Panel.


Now go to Plugins and install “File Manager” by searching in plugins.


In your WordPress site’s root directory, find wp_config.php. The file contains your WordPress site’s configuration settings. You can find it in “public_html.”


Copy the wp_config.php file to your computer and open it in a text editor.


Add the code above to the file, replacing with the new URL for your site.


Upload the updated wp_config.php file to your site.


Clear your website cache and visit your WordPress site using the new URL to ensure it’s working correctly. That’s all; you have successfully changed the URL using the “wp_config” file.

Method 4: Use the AIOSEO Plugin to Change the Site URL

If you want to change the URLs of your WordPress site using the AIOSEO plugin, simply follow these steps:

Once logged into your site, navigate to the AIOSEO plugin settings. Tap the “General Settings” tab and select the “Permalinks” option from the side menu.


In the “Permalink Settings” section, you will see a field where you can enter the new URL structure for your site.

Enter the new URL structure that you wish to use and click “Save Changes” to save it.


If you want to change the URLs of individual posts or pages, you can edit the post or page and then select the “Edit” button next to the URL field.

Enter the new URL and click “Update” to save the changes.

Keep in mind that changing the URLs of your site can affect its search engine rankings, so it’s important to use a consistent and logical URL structure to avoid any negative impacts.

You may also want your old URLs to be redirected to the new ones to ensure that your site’s visitors can still access your content.

Wrapping Up

Changing a URL in WordPress is easier than it may seem. Following the four methods discussed above, you can easily and quickly update your URLs without problems.

Whether you’re using a plugin to make the change or updating your database directly, these methods are all reliable ways to ensure that the change is made correctly.

With these tips in mind, you can easily manage your WordPress URLs and ensure your site is up to date.

You can change your WordPress URL in several ways. The best method depends on your level of comfort with code and access to your site files. If you’re comfortable working with code, you can edit the wp_config or functions.php file.

Those who don’t want to mess with code can use a plugin like AIOSEO to handle it. Finally, if you feel comfortable working directly with the database, you can also change the WordPress URLs.

Whatever method you choose, make sure that you back up your site before making any changes so that a safety net is available in case something goes wrong.