Close Menu
Infoceptor
  • Business
  • Finance
  • Technology
  • Health
  • Life
  • More
    • Auto
    • Food
    • Health
    • Home
    • Space
    • Travel

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

What's Hot
Flywheel Logo

Flywheel review in 2023

June 8, 2023
Travel restrictions in Canada are different depending on where you're traveling from and to. Here's what you need to know before you go.

Canada: Traveling restrictions and what you need to know before you go

May 19, 2024
If you are planning a trip to Spain, there are some travel restrictions that must be taken into consideration.

Spain: Traveling restrictions and what you need to know before you go

May 19, 2024
Facebook X (Twitter) Instagram
Infoceptor
  • Business
    This guide will show you how to determine the value of your business using different business valuation methods.

    How to value you business – The ultimate guide for 2023

    May 9, 2024
    Have you ever thought of starting your own laundry service? Find out how with this easy guide.

    How to start a laundry service company in 2023

    May 5, 2024
    Learn about the best online payment solutions available to you. Check out what’s available, learn their pros and cons, and choose the one that best fits your needs.

    The 15 best online payment solutions in 2023

    April 27, 2024
    Learn how to create powerful backlinks for your website and increase your site's search engine ranking.

    How to build backlinks to your website

    April 25, 2024
    In this beginner's guide, we will show you the steps involved in creating a mobile app.

    Beginner’s guide on how to develop a mobile app

    April 24, 2024
  • Finance
    Learn how to build wealth and financial security. This article will share steps you can take to build a reliable cash reserve that will grow over time.

    Do you want to build wealth? Here are some ways to grow your money

    May 18, 2024
    Want to know your tax bracket? Check out our article for an overview of the different brackets and what you can expect to pay in 2022.

    Understanding IRS tax brackets – here’s what you’ll pay in 2023

    May 14, 2024
    This article will cover the best electric vehicle battery stocks to buy and invest in.

    The 10 best EV battery stocks to buy in 2023

    May 9, 2024
    The 10 most active penny stocks to watch this year is a list of the most active penny stocks ranked by total volume.

    The 10 most active penny stocks to watch in 2023

    May 8, 2024
    These electric car stocks are making a lot of money and you should consider adding them to your portfolio.

    The best electric car stocks to buy in 2023

    May 8, 2024
  • Technology
    Flywheel Logo

    Flywheel review in 2023

    June 8, 2023
    This article provides a list of the top iPhone models available today. Each model is reviewed based on features, specifications, performance, design and price point.

    Top iPhone models we’ve tested and you should get

    May 17, 2024
    Find out everything you need to know about the Apple Airpods Pro, including their price, features and if they're worth buying.

    Are Apple AirPods Pro a great choice in 2023?

    May 17, 2024
    To help you find the best responsive WordPress themes, we analyzed more than 100 themes and found those that are currently trending.

    The best responsive WordPress themes in 2023

    May 16, 2024
    These sympathy gifts make a great way to show you care while they also help your loved ones get through the tough times.

    The 15 best sympathy gifts that will show you care

    May 15, 2024
  • Health
  • Life
    These sympathy gifts make a great way to show you care while they also help your loved ones get through the tough times.

    The 15 best sympathy gifts that will show you care

    May 15, 2024
    Water bottles are a great way to stay hydrated. This article is dedicated to the most popular water bottles of the year!

    The best water bottles of 2023

    May 10, 2024
    Learn 30 weird and fun facts that will make you question everything.

    30 weird and fun facts that will make you question everything

    May 10, 2024
    Find out which cities in the US are the best for quality of life by checking out this article.

    20 best cities for quality of life in the USA

    May 7, 2024
    There are many ways to print your designs on t-shirts. Check out our list of the best printing services that offer top-notch quality at affordable prices.

    The 10 best T-shirt printing services of 2023

    May 6, 2024
  • More
    • Auto
    • Food
    • Health
    • Home
    • Space
    • Travel
Facebook X (Twitter) Instagram
Trending
  • Flywheel review in 2023
  • Canada: Traveling restrictions and what you need to know before you go
  • Spain: Traveling restrictions and what you need to know before you go
  • Do you want to build wealth? Here are some ways to grow your money
  • Our in-depth review of the Always Pan
  • Top iPhone models we’ve tested and you should get
  • Are Apple AirPods Pro a great choice in 2023?
  • The best shower heads of 2023
Infoceptor
Home»Technology»WordPress»How to change your WordPress website URL
WordPress

How to change your WordPress website URL

Matthew DrummondBy Matthew DrummondSeptember 7, 20236 Mins Read
Facebook Twitter LinkedIn Reddit Telegram WhatsApp Pinterest Email
Share
Facebook Twitter LinkedIn

Knowing how to change your website URL on your WordPress website is important. You may need to change your website URL for several reasons:

  • Enabling SSL (switching from http:// to https://)
  • Moving your website to a subdomain
  • Moving your website to a different directory
  • Changing your domain name
  • Migrating from a staging environment to a live website
  • Migrating from your local computer to a live website

The WordPress address and site address define the address of your website on the internet and the location of your website files. Your WordPress website URL is also your domain name.

Sometimes, you may even need to change the address settings because you see too many redirect errors in WordPress.

There are four different ways to adjust your website URL with WordPress:

  • From your WordPress dashboard
  • Using the functions.php file
  • Using the wp-config.php file
  • Using the phpMyAdmin application

When changing your website URL, there are two separate settings we need to update – the WordPress Address and Site Address.

If you’re a beginner, this may be a bit confusing because the settings look similar, but they serve different purposes. 

The WordPress Address URL is where your WordPress website files and folders are stored, such as plugins, themes, admin pages, media files, etc.

The Site Address URL is essentially your public domain name (https://yourdomain.com) and how visitors can reach your website.

In most cases, these two URLs will be the same, but they could be different in some cases.

Big businesses that use several different applications may choose to host their WordPress website on a different server to avoid clutter and single points of failure.

Now that we’ve cleared a few points up, let’s get started!

Here are four different ways you can change your WordPress website URL:

Change your website URL from your WordPress dashboard

This is the easiest method and if you can access your WordPress Dashboard as an administrator – we recommend using this technique.

Log in to your WordPress dashboard, and head to Settings > General page:

As you can see above, all you need to do is adjust your WordPress Address (URL) and Site Address (URL) values and click Save Changes at the bottom of the page to complete the operation.

As we mentioned previously – in most cases, both WordPress and Site Address are the same URL.

Once saved, make sure to visit your website and ensure that everything was updated correctly.

Change your website URL using the functions.php file

If you’re not able to access your WordPress dashboard – this method can help you out. Log in to your website via an FTP client, or use a File Manager application in your cPanel control panel and access the folder. In our example, we’re using the Storefront WordPress theme for our test website.

/wp-content/themes/your-theme-directory/ 
/wp-content/themes/storefront/ 

Locate the functions.php file and if you use an FTP client, download it and edit it using the Notepad or a TextEdit application.

If you use a File Manager, you can edit the file directly using the Edit button:

Scroll down to the bottom of the file, and add these two lines:

update_option( 'siteurl', 'https://example.com' );
update_option( 'home', 'https://example.com' );

Make sure to replace example.com with your new domain name.

Save the file and re-upload it to the same directory you downloaded it from if you used an FTP client. If you decide to use your File Manager, click Save Changes to save the changes.

Make sure to visit your website and ensure that everything works properly.

This method will directly update the site URLs in the database each time the theme’s functions.php file is loaded.

Once you’re able to access your WordPress Dashboard and change your WordPress and Site addresses there – make sure to remove those two lines from the functions.php file.

Change your website URL using the wp-config.php file

If you cannot determine the theme you need to edit or can’t find the functions.php file – you can use this alternative method. With this method – we’ll be adding site URLs to the primary WordPress configuration file – wp-config.php, which is located in the root directory of your website.

As explained previously, download the wp-config.php file via FTP or edit it directly with File Manager, and add these lines right above the “That’s all, stop editing! Happy publishing” line:

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

Make sure to replace example.com with your new domain name.

Save changes to the file (or re-upload it to your website) and then visit your website to ensure everything is up and running.

Change your website URL using phpMyAdmin

The last method changes site URLs directly in the WordPress database. Log in to your cPanel control panel and click phpMyAdmin under the Databases section:

Once in the phpMyAdmin interface, find your database in the left frame and click on it:

In the right frame, find the wp_options table, and click the Browse button:

Please note that your database tables may have a different prefix.

Next, find the siteurl and home fields under the option_value column, click the Edit button to adjust them:

Change your website URL in the option_value field, and click the Go button at the bottom to save the changes.

Perform the same operation for both the siteurl and home fields.

Once completed – check your website to make sure it’s working correctly.

Additional information

If you have problems adjusting your website URLs using one of these methods – we recommend trying other ones to see if they help.

For example, if you see your website URLs greyed out in your WordPress Dashboard > Settings > General, this means that your website URLs are hardcoded in the wp-config.php file. Simply change the values using the wp-config.php method we described above and you should be good to go.

Also, changing the WordPress and Site Address isn’t enough for some users as they have hardcoded old URLs in their pages, posts, and other content.

To fix that, you’ll need to use a plugin to automatically search and replace all old URLs in the database with the new domain name.

We recommend using the Better Search Replace plugin, as it’s free and very straightforward to use:

Final words

Whether you’re a seasoned WordPress user or a beginner, you need to know how to change your website domain name when using WordPress. Any of the methods we outlined in this article will help you change your WordPress website URL.

People also viewed:

The 3 best ways to speed up your WordPress website How to configure and use a WordPress website How to create an educational website with WordPress How to fix broken links on your WordPress website How to monetize your WordPress website
links update urls website WordPress
Share. Facebook Twitter LinkedIn Reddit Telegram WhatsApp Pinterest Email
Previous ArticleHow to upload files from a WordPress form to Google Drive
Next Article How to update your feature image across articles
Matthew Drummond

Matthew is a Infoceptor Technology writer. Having worked as a systems administrator for over 15 years gives him unique insight into the inner works of technology. Ultimately his passion for writing brought him to share his technical expertise with the world.

Related Stories

How to configure and use a WordPress website

February 16, 2024

How to create an educational website with WordPress

February 10, 2024

How to fix broken links on your WordPress website

December 29, 2023

The 3 best ways to speed up your WordPress website

September 7, 2023

Comments are closed.

Connect
  • Facebook
  • Twitter
  • Pinterest
  • Instagram
  • YouTube
  • LinkedIn
  • Reddit
  • TikTok
Don't Miss
Flywheel Logo Reviews

Flywheel review in 2023

By Matthew Drummond

Flywheel is a fast-growing web host that offers high-performance WordPress hosting for agencies, designers, and developers.

Travel restrictions in Canada are different depending on where you're traveling from and to. Here's what you need to know before you go.

Canada: Traveling restrictions and what you need to know before you go

May 19, 2024
If you are planning a trip to Spain, there are some travel restrictions that must be taken into consideration.

Spain: Traveling restrictions and what you need to know before you go

May 19, 2024
Learn how to build wealth and financial security. This article will share steps you can take to build a reliable cash reserve that will grow over time.

Do you want to build wealth? Here are some ways to grow your money

May 18, 2024
  • Auto
    • Auto Reviews
    • Electric
    • Insurance
  • Business
    • Company
    • Government
  • Entertainment
    • Movies
    • Music
  • Finance
    • Credit Cards
    • Crypto
    • Market
    • Personal Finance
  • Food
    • Coffee
    • Drinks
    • Holidays
  • Health
  • Beauty
  • Fitness
  • Food
  • Medical
  • Home
  • Backyard
  • Bathroom
  • Bedroom
  • Cleaning
  • Furniture
  • Home Office
  • Kitchen
  • Life
  • Astrology
  • Family
  • Fashion
  • Outdoors
  • Personal
  • Pets
  • Apple
  • Audio
  • Domain Names
  • Gaming
  • Google
  • Power
  • Reviews
  • Samsung
  • Destinations
  • Gear
  • Services
  • Space
  • Tourism
  • Technology
  • Tutorials
  • Web Hosting
  • WiFi
  • WordPress
  • Travel
  • Shopping
  • Sports
  • Work
  • Stocks
  • Television
  • Web Hosting
Facebook X (Twitter) Instagram Pinterest YouTube LinkedIn Reddit TikTok
© 2026 Infoceptor

Type above and press Enter to search. Press Esc to cancel.