How to change site Url and home Url settings in WordPress?

0
429
home-url-site-url

What is WordPress?

WordPress is a free and open source content management system based on PHP programming language and MySQL. WordPress platform supports plugin and template oriented framework for web development and it helps the user to create a customized website easily.

WordPress is free software, this means the user can to download, install, modify easily. It is also open source which helps the user can view the source code and easy to edit the code at the developer end.

Site Address – Site URL

The site address or site URL is the address you want to your website to type in a web browser to reach the website.

For example” http://mydomain.com

WordPress Address- WordPress URL

The WordPress URL helps the user to store the core WordPress files. In most cases, Site URL and WordPress URL will be the same. 

How can I change the URLs?

Both the Site URL and Home URL can be changed through three ways. It can be done either by using the WordPress admin dashboard, through wp-config.php file or through the database directly.

Using the WordPress admin:

The WordPress admin panel provides the option to change the URL values. Log into the WordPress dashboard.

Go to Settings>>General page. Enter the new value for WordPress address URL or Site address and click save changes.

Using the wp-config.php file:

This is the easiest way to modify the WordPress URLs via the wp-config.php file.

Follow the below steps to change the wp-config file.

  1. Edit your wp-config.php file.
  2. Insert the below code your WP_HOME and WP_SITEURL in the wp-config.php file.

define(‘WP_HOME’,’http://mydomain.com’);

define(‘WP_SITEURL’,’http://mydomain.com’);

Change WordPress address from the database:

The user can change the URLs through the WordPress database using the phpMyAdmin tool. The following instructions will help you on how to change the WordPress website URL using phpMyAdmin in cPanel.

  • Login to cPanel and go to PhPMyAdmin menu.
  • Select the database which is used for your WordPress website.
  • Click on the wp-options table and find the option_name Site URL. Click the checkbox and Edit.
  • Change the option_value to the correct URL and click the Go button to save the change.
  • Search Option_name namely home and repeat the same process.

The above methods will help you to change the site URL and WordPress URL to redirect the site properly.

We hope that this article will help you to change the Home URL and Site URL in different ways. For more information, follow us on Twitter and Facebook and For video tutorials, subscribe to our YouTube channel ServerCake India.

LEAVE A REPLY

Please enter your comment!
Please enter your name here