Learn how to change your WordPress URL in 4 quick methods – WAU

Many users find it difficult to change the WordPress URL, and this is a task that will be needed at some point. However, there are ways to make the change beyond the Administration area. Editing the “functions.php” and “wp-config.php” files are some of the recommended paths.

The URLs added to the WordPress platform are addresses that deserve attention, as they are directly related to the management of the blog files and the way your business appears in search results carried out on the internet.

Based on that, changing the WordPress URL may be necessary at various times. The question is, do you know how to do this?

If the answer is “no”, don’t worry, as we have developed an exclusive step-by-step to help with this task. So, take advantage of the tips below and get to know some of the main questions users have about it!

Why do you need to know how to change WordPress URLs?

There are many reasons why you may need to change your WordPress URL. The main ones are:

  • change the transfer protocol from HTTP to HTTPS;
  • change the domain for reasons of SEO strategy;
  • migrate the website and / or blog from one server to another.

In addition, you may need to change your WordPress address settings if the page has a lot of redirect errors. This is common after a while on the air.

That way, knowing how to change the URL will allow you to solve problems without the need to hire a programmer, reducing costs and risks of making mistakes in the process.

How to change the WordPress URL?

Now that you know the importance of knowing the process, we have separated 4 methods that should help you change your WordPress URL more quickly and easily. Check out the steps below!

Method 1: using the Administration area

This is the easiest method to change the WordPress URL. However, not everyone has access to the Administration area. If this is not the case, access the platform and, in the column “Dahsboard” (Panel), click on “Settings” and “General”.

Now just click on the “WordPress Address” and “Site Address” fields and change the URL. Usually, both fields have the same address. Finally, click on “Save Changes” to confirm the changes and enter the new website or blog URL in your web browser to test.

Method 2: using the functions.php file

If you do not have access to the WordPress Administration area, this will be the best way to change your URLs, as it is the second easiest. Then, access the platform website using an FTP Client, click on “wp-content”, “themes” and “your-theme-folder”.

In the list of files that will appear, locate one with the name “functions.php”, right-click and select the option “View / Edit”. Use a plain text editor, such as Notepad or TextEdit to do this. Then, add the following codes at the bottom:

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

Replace the word “example” with the domain name of the blog or website. Now, you just have to save the changes. A copy will be created on your computer and you will have to upload the file with the changes to the same location where it was hosted.

The advantage of this method is that it updates the URLs directly in the platform’s database. Then, to see if the change worked correctly, type the new URL into your computer’s web browser and press “Enter” on the keyboard.

Method 3: using the wp-config.php file

This method is similar to the previous one, only a little more complex. Therefore, it is only recommended to use it when you cannot find the file “functions.php”.

To start the process, access the WordPress website using an FTP Client and locate the “wp-config” file. It is located in the root folder of your website.

After opening the file, above the line that says “That’s all, stop editing! Happy publishing ”, add the following codes:

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

As in method 2, replace the word “example” with the domain name of your website, save the changes and upload the new file to the original hosting location, replacing the previous one. Now, visit the site and see if the changes worked.

Method 4: using the phpMyAdmin database

If none of the previous steps work, you can change the WordPress URL by directly accessing the platform’s database. However, if you prefer this method, it is recommended that you do a backup of files before to undo changes in case something goes wrong.

To get started, access your web hosting provider’s Dashboard and click on the “phpMyAdmin” icon. It is located in the “Database” section. Doing so will open a screen that will allow you to make changes online.

Within the “phpMyAdmin” interface, you must click on “WordPress Database” in the left column, so a table with the necessary files will be displayed. Use the scroll bar until you find the “wp_options” file and click on it.

Now find the lines named “siteurl” and “home” in the “option_name” column. Then click on “Edit” (pencil icon) to change the two lines in the “option_value” column. After that, click on the “Go” button in the lower right corner to save the changes made. Finally, visit the website to test the changes.

What are the most frequently asked questions about this process?

Even with the walkthrough, some people find it difficult to make WordPress URL changes. Because of this, we have listed below some of the most common questions among users and how to solve problems. Follow!

Why are the “WordPress Address” and “Site Address” fields blocked?

In many cases, the “WordPress Address” and “Site Address” fields, in the platform’s Administration area, may be blocked for editing actions. This usually happens because the URLs are encoded in the wp-config.php file.

So, to be able to make changes, you must follow another path. Method 3, presented above, will be the best option.

Why should I change the website and WordPress URL separately?

This can be confusing, especially for beginners, as each field defines a URL for a specific function and they can have the same description (the same link for both fields).

Therefore, the “WordPress Address” is a URL that allows access to the location where your blog folders and files are stored. In other words, it is a link aimed more at blog management, with media files, plugins, templates etc.

The field “Site Address” defines the URL that will be accessed by web users. In other words, it is a public address, which will appear in the search results performed online, keeping access to the administration pages of the blog blocked.

In the case of large companies, which host their websites and blogs on different servers, these URL addresses can be different, keeping some applications isolated from others.

This “multiserver” strategy is what guarantees the security, availability and stability of the digital services offered.

How to undo the change and recover the old URL?

Out of curiosity or for the purpose of learning, some people may tamper with the Administration area of ​​the platform and change WordPress URLs accidentally, not knowing how to undo this action.

However, it is possible to reverse the changes following the steps described in methods 2, 3 and 4, if you do not have access to it in the Administration area.

Is there a plugin that makes it easy to change the URL?

Yes, you can use the plugin “Velvet Blues Update URLs” or the “Better Search Replace” plugin. They allow you to update URLs in bulk. That is, with these plugins, you can change the URL of all the pages of the blog and / or the website at once, using only one configuration screen.

If you had to make each change individually, depending on the number of pages, the job would take too long. With plugins, on the other hand, you save a lot of time in the process.

These plugins are mainly useful in migration operations to other platforms and servers hosting, facilitating URL changes.

Defining a friendly and user-friendly URL is part of the Digital Marketing strategy. In addition, with the growth of the business, the migration of the site to virtual servers (cloud server) will be inevitable over time.

For these reasons, you will have to change WordPress URLs sooner or later. So, use this post as a guide to assist in the process.

Want to have more information on the subject? Download the “WordPress Guide to Corporate Blog” ebook right now and get ahead of the competition! It is free and very complete.