Enter your search term

Search by title or post keyword

How to Change WordPress URL Using 2 Easy Methods

Our website is supported by our users. We sometimes earn affiliate links when you click through the affiliate links on our website

Contact us for Questions

 Only 4 reasons can make changing WordPress URL a noble cause to pursue.

Other than them, it’s advisable not to tamper with the URL of your WordPress site for SEO reasons, especially if you own an agelong established website.

Let’s start with these four legitimate reasons.

Why Change WordPress Website URL:

  1. You just purchased an SSL certificate and want to update your website from HTTP to a more secure HTTPS.
  2. You want to move your website from a local server to a live server.
  3. Now you have a brandy domain that meshes better with your brand than your existing domain name.
  4. You want to change your domain extension. For instance, switching from a .net to a .com website.

Whatever your reason, this tutorial will show you how to change WordPress permalinks step by step with pictures.

Frequently Asked Questions

Can I Change My WordPress Domain?my WordPress domain?

Of course, you can change your WordPress domain.

But changing your domain name must be anything but an everyday act.

Besides the SEO catastrophe that might befall your website, it’s in your brand reputation’s best interests.

What Happens If I Accidentally Change My WordPress URL?

Changing WordPress URLs by accident can have devastating effects on your business.

The big hit consequence is that your website will no longer be accessible to users and search engines.

Another issue is that you’ll be in for too many redirects within your site.

How to Change WordPress URL: 3 Easy Methods

Before changing URLs, create a backup for your WordPress website.

Should things go haywire during the process, you can restore the previous version of your website.

After backing up your website, you can use any method below to change your WordPress URL.

  • Method 1: Change WordPress URL via Admin Dashboard
  • Method 2: Change WordPress URL by editing the wpconfig.php file
  • Method 3: Change WordPress URL by modifying the theme function.php file
  • Method 4: Change WordPress URL by using plugins.

1. How to Change WordPress URL via Admin Dashboard

The simplest and the most popular method of changing WordPress URLs is via the WordPress Admin dashboard.

Below are steps and pictures to guide you.

Log in to your WordPress dashboard

Go to Settings and choose General from the popup options.

1 4

On the General settings page, you need to update two separate addresses, your WordPress Address, and your Site Address. Make sure that both URLs you’ll input are the same.

2 5
  • WordPress Address (URL): The address where all your WordPress files and folder are stored.
  • Site Address (URL): The public URL address users type into their browsers to reach your site.

Scroll down to click the Save changes button to apply your settings.

Done. Your website can now only be accessed via the new URL.

2. How to Change WordPress URL by editing the wpconfig.php file

The second method of changing URLs in WordPress is adding 2 lines of code to the wpconfig.php file on your website server.

After completing this method, the URL input field in the WordPress general settings will be greyed out.

Hence, you can’t change the URL from your admin dashboard in the future unless you remove the code snippet added to the wpconfig.php file.

To use this method, you first need to connect a File Transfer Protocol ( FTP) to access website files on the server.

The FTP used in this guide is Cyberduck.

After connecting, you can proceed with the following steps.

On your FTP client home screen, go to your domain name and click to open the public_html folder.

3 2

Scroll down to locate the wp-config.php file, double-click on it, and follow the onscreen dialogue to download the file to your computer.

4 1

Open the downloaded file with a text editor on Notepad and add these two lines of code above the line that says, “That’s all, stop editing! Happy publishing.”

6

Note: Make sure you replace the existing domain (mywebsite.com in the example)with the new URL you want to change to.

Now, press Enter on your keyboard to save the changes.

Upload the file back to your website server.

7

Done! Access your website to confirm everything is okay.

3. Change WordPress URL by modifying theme function.php file

Another method to change the URL on your site is to edit the WordPress theme function.php file.

This method also requires you to access your server files with an FTP.

After connecting, you use these steps.

On your FTP client home screen, go to your domain name and click to open the public_html folder.

Locate and select the wp-content folder from the list.

8

Right-click to expand themes, click the function.php file under your current theme, and follow the onscreen dialogue to download the file to your computer.

9

Open the downloaded file with a text editor or Notepad on your computer. Add the following code snippet to the bottom, and don’t forget to replace the placeholder domain with your new domain.

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

update_option( 'home', 'https://mywebsite.com' );
6 1

Press Enter on your keyboard to save the changes.

Upload the file to your server via FTP.

Visit your website to check if everything is working.

How to Change WordPress URL by using plugins

If all the methods above sound too technical for your liking, don’t worry.

Using a plugin is a more straightforward way to change WordPress URLs.

Velvet Blue Update URLs is a WordPress change URL plugin that allows you to bulk update links on all pages, posts, and media on your website.

It’s of immense use when you are changing the URL of a large website.

This plugin allows you to update URLs throughout your website.

This approach is better as it poses no threat of broken links and redirects to your websites.

Also, the windows for mistakes are minimal, as you wouldn’t be altering any file on your server.

You first need to install and activate the plugin on your website.

Here’s how to use it.

On your WordPress dashboard, go to Tools on the left pane and select Update URLs from the popup menu.

1111

Enter your old URL in the field labeled Old Site Address. Type your new URL into the field labeled New site Address.

33

Next is to Choose which URLs should be updated by checking the box next to them. And lastly, click the Update URLs NOW button to effect the changes.

Now, visit your website to confirm the URL change.

Wrapping Up

Hopefully, you should be able to change WordPress URLs by following the steps in this guide.

Although it can be somewhat tricky, we’ve handed you different methods to choose from.

If you are the type that loves getting through stuff fast, use the Admin dashboard or Plugin method.

For tech explorers like us, playing around with a few lines of code is a great idea.

If you have any questions or thoughts to share, feel free to drop us a line in the comments.

Similar Tutorials to Check Out

  • How to Move WordPress to a New Host:Is your hosting platform giving you a headache? Use this guide on how to move WordPress to a new host to cure it once and for all.
  • How to Change a Font in WordPress: So your visitors are complaining bitterly about the eye-straining font on your website. In less than 10 minutes, you’ll learn how to change a font in WordPress.
  • How to Migrate a WordPress Site: Say you’ve decided to migrate your website but aren’t sure which way to go. Find answers to all your how-to-migrate WordPress website questions here.

Leave a Comment