Knowledge Base

How Can We Help?

How to Change WordPress Site URLs (Best Methods)!

You are here:

WordPress is a content material administration system that doesn’t require any introduction. Thousands and thousands of blogs and web sites and shops are powered by WordPress. It’s so big that there are literally thousands of completely different instances which may require modifications within the configuration of the web site. One such case is the change within the area title of the web site. On this brief information, I’ll present you completely different strategies to alter WordPress website URLs.

By website URLs, I imply the WordPress deal with and the Website deal with. Each of them are identical within the majority of the instances. Each of them are the bottom URLs of your WordPress website.

So, On this information, I’ll present you three completely different strategies to replace the URLs of your WordPress web sites. The three strategies are:

  1. Change WordPress URLs from the Admin part
  2. Replace URLs from wp-config.php
  3. Change WordPress URLs utilizing WP-CLI

Let’s begin our information with the primary and the best methodology to alter WordPress website URLs.

Change WordPress Website URLs from the Admin part

That is the best methodology to alter WordPress URLs. The very first thing it’s a must to do is to log in to the Admin part of your WordPress website. As soon as you’re logged in, click on on the Settings part from the left sidebar. On the Common Settings web page, you will notice a bunch of fields for a bunch of knowledge.

In that kind, you will discover two fields with (URL) within the label. Identical to the next picture.

Change Wordpress Site Urls

Enter the brand new URLs in each of those fields and click on on the Save Modifications button given on the backside of the settings web page. As soon as executed, it is possible for you to to entry your website on the brand new WordPress URLs.

Change URLs with wp-config.php

When you don’t need to change URLs from admin part or can not change URLs from the admin part, don’t fear! You may really set the URLs from wp-config.php file. So, Open up the file supervisor or FTP shopper and navigate to the WordPress set up listing.

As soon as you’re there, Edit the wp-config.php file and add the next strains on the finish of the file.

outline('WP_HOME', 'https://newexample.com');
outline('WP_SITEURL', 'https://newexample.com');

Now, Save the file and it is possible for you to to entry your WordPress website utilizing the brand new URLs. Observe that the values set within the wp-config.php file will override the URLs supplied within the Common settings web page of WordPress.

Now, Let’s transfer on to the final methodology to alter WordPress website URLs.

Change WordPress URLs utilizing WP-CLI

WP-CLI is an superior device to handle all of your WordPress cases utilizing the command line interface. It is extremely straightforward to handle WordPress settings utilizing WP-CLI. You can too set the positioning URLs utilizing the WP-CLI device.

It simply takes two instructions to replace the URLs utilizing this methodology. However to execute these instructions, it’s a must to hook up with your server through SSH. If you’re utilizing Linux primarily based working system or Mac OS, open up the terminal and join together with your server through SSH straight. If you’re utilizing Home windows, use Putty or Bitvise to attach together with your server through SSH.

As soon as you’re in, Execute the next instructions to replace the URLs of your WordPress website.

wp possibility replace house 'https://newexample.com'
wp possibility replace siteurl 'https://newexample.com'

So, that’s all it takes to replace Website URLs utilizing WP-CLI. If you wish to set up WP-CLI on Linux, you may comply with our information too!

 

Conclusion: There may be another methodology to replace the WordPress website URLs. In that methodology, you’ll mainly log in to the PHPMyAdmin and replace the positioning URLs straight into the database. It’s a little bit onerous if you’re dealing with this for the primary time. However the above-given strategies are the best and the most effective! Tell us within the remark part if you’re dealing with any subject altering WordPress website URLs, we’ll reply again with the answer as quickly as potential.

Leave a Comment