How to Change WordPress Site URLs? (Step by Step)

How to Change WordPress Site URLs? :- When you are moving your site from HTTP to Https, want to change your domain name, Moving your site local server to live site, then you will need to change your WordPress site URLs. If you are beginner then this post is helpful for you.

As well as you know that WordPress address and site address are must important fields because they references the address of your website on internet and the location of your website files.

Here in this article we will tell you How to step by step you can change your WordPress site URLs.

How to Change WordPress Site URLs?

Before starting change into WordPress URL you need to know two thing very well. That is WordPress Address and Site Address.

It was very confusing thing for beginners because they don’t know about it and what is the difference between both.

WordPress Address:- The WordPress URl or address is the paace where you stored your files and folders including your admin pages, media files, plugins and themes etc.

Site Address:- It is the public facing part of your WordPress website. It is the address of your website that is visitor will type for reach your website. This link you will be put on your business cards.

In many different cases, large organization may host their WordPress  sites on different servers because corporate website have many other applications running as well on the same server. And they  want to abstract where each application is hosted.

Let’s see that how to change easily your WordPress site URLs. We will show you some following methods, in which you can choose best methods will work best.

Method 1. Change WordPress Site URL from Admin Area

For use this method you have to need WordPress admin area access.

Simply login to your WordPress website and go to setting >> general page. Here you can change WordPress site URL under the “WordPres Address” and “Site Address” option. Both area are usually same address. So, click on save changes button to save your changes. Now visit on your WordPress site and make sure that everything is working proper.

Method 2.Change WordPress Site URLs Using functions.php File

If you don’t have WordPress admin area access then you should be use this method to change WordPress Site URL.

Simply connect to your WordPress site by using FTP client and go to /wp-content/themes/your-theme-folder/.

Here you need to locate the function.php file and edit it in notepad or other plan text editor.

Here we explain some example of our website. You can replace your site url as well as :-

Next, you add this following code at the bottom:

  1. Update_option( ‘siteurl’, ‘https://bscriptsource.com’ );
  2. Update_option( ‘home’, ‘https://bscriptsource.com’ );

Make sure you have to replace https://bscriptsource.com with your own site URLs. Now you can save your changes and upload file back to your website by using FTP. Please visit t your site and see that everything is working proper.

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

We recommended this method only when you are unsure which WordPress theme you need to edit or cannot find the function.php file.

You will be adding the site URLs to your WordPress configuration File for this method which called wp-config.php. This file is located in the root folder of your website where all data of your website is stored and contains important WordPress settings.

You can connect to your website by using DTP client and edit wp-config file. Now you need to add following code:-

define( ‘WP_HOME’, ‘https://bscriptsource.com’ );

define( ‘WP_SITEURL, ‘https://bscriptsource.com’ );

Don’t forget to replace https://bscriptsource.com with your own domain name.

Now save your changes and upload them back to your server. Please visit your website and make sure everything is working fine.

Method 4. Change WordPress Site URLs in the Database Using phpMyAdmin

You can use another way to change your WordPress site URLs. You can update it by changing directly in your WordPress database.

Firstly you need to make a WordPress database backup. This is very important step and will helps you when something goes wrong.

After that you need to go on your hosting account’s dashboard and click on phpMyAdmin icon under the database section.

When you click the link it will be launch the phpMyAdmin app, which provides you a database interface to edit MySQL databases.

Inside phpMyAdmin interface, you need to click on your WordPress database from left column and now you can see that app will display inside your WordPress database.

Next step is, you need to scroll down to the option table. The data will prefix by default but since you can change WordPress database prefix. PhpMyAdmin will now display the row option inside the table where you need to locate the option_name is site URL and home.

Now click on the pencil icon to edit each row and change the option_value fields to the new URL. Now click on the go button and save your changes.

Now visit your site and make sure everything is working fine.