The URL structure of a website is a crucial decision. It determines the user experience and the way their search engine rank is being determined. In this section I will talk about what a URL structure is and how it should be created.

URLs are not just long strings of numbers and letters that you type into your browser to visit websites, they are actually more than that. A URL is actually an address that tells your browser how to find the resource on the Internet that you’re looking for.

In this article, we will share four different ways to easily change your WordPress site URLs (step by step).

Why Change WordPress Site URLs?

There are several reasons why you might need or want to change your WordPress URL which may include:

  • You may need to update site URLs when moving WordPress from local server to live site.
  • If you have moved your WordPress site to a new domain name, then you will need to change site URLs to reflect the change.
  • If you’re moving WordPress to a different directory such as removing /wordpress/ from WordPress url.
  • You will also need to change it when moving WordPress from HTTP to HTTPs.

Ready? let’s get started.

Method 1 – Change WordPress Site URLs from Admin Area

This method is the easiest. If you can already access the WordPress admin area, then we recommend using this method.

Simply login to your WordPress website and go to Settings » General page. From here you can change WordPress site URLs under the ‘WordPress Address’ and ‘Site Address’ options.

wp admin settings

WordPress Address and Site Address are usually the same address.

Do not forget to click on the ‘Save Changes’ button to store your settings. You can now visit your website to make sure that everything is working OK.

Method 2 – Change WordPress Site URLs Using wp-config.php File

For this method, you will be adding the site URLs to your WordPress configuration file called wp-config.php. This file is located in the root folder of your website and contains important WordPress settings.

Simply connect to your website using an FTP client and edit the wp-config file. You need to add the following code just above the line that says ‘That’s all, stop editing! Happy publishing’.

  1. define( ‘WP_HOME’, ‘https://example.com’ );
  2. define( ‘WP_SITEURL’, ‘https://example.com’ );

Don’t forget to replace https://example.com with your new domain name.

You can now save your changes and upload them back to your server. After that, visit your website to make sure that everything is working fine.

Method 3 – Change WordPress Site URLs in the Database Using phpMyAdmin

For this method, go to your web hosting account’s cpanel and click on the phpMyAdmin icon under the Databases section.

PhpMyAdmin should open in a new tab. On the left panel locate and click on wp-options table. Note that your database prefix may not necessarily be ‘wp’. Just ensure it is the options table. Once there, Select the Site url and click on edit. Update the “option value” with the new url and click on ‘Go’. Repeat the process for “home url”.

You can now visit your website to see if everything is working fine.

LEAVE A REPLY

Please enter your comment!
Please enter your name here