How to Change WordPress Site URL via phpMyAdmin

Changing the WordPress site URL is an inevitable activity. A growing WordPress site or one under active development and testing introduces new URL routes to make it more flexible, dynamic, and easily explorable to the targeted internet users.

One reason to remove this issue of changing WordPress site URLs from your bucket list is the fact that your WordPress site developer might not always be on speed dial.
When a WordPress site changes its domain name, the domain name change does not automatically integrate with the already configured site URLs.

[ You might also like: How to Create New WordPress Admin User via phpMyAdmin ]

Some essential settings and steps need to be executed before the domain switch is considered a success.

Why Change Your WordPress Site URL?

The following four cases best describe ideal circumstances that should persuade WordPress site users to consider changing or editing their site URLs.

1. Switching to a New Directory

This case applies to instances where a WordPress site is residing in a different directory location. If the WordPress site moved to a subdirectory location with a name like a blog, this move from the site main directory can be textually represented as:

linuxshelltips.com → linuxshelltips.com/blog

Moving the WordPress site can also be from subdirectory location to main directory location.

linuxshelltips.com/blog → linuxshelltips.com 

2. Addition/Removal of the WWW Extension

Maybe you do or do not prefer your WordPress site accessed with the URL extension www. Such a case can be textually represented in the following manner.

www.linuxshelltips.com → linuxshelltips.com   
or
linuxshelltips.com → www.linuxshelltips.com 

3. Addition of the HTTPS Extension

An SSL certificate is extended life insurance for any website as it protects such sites from harmful traffic. A WordPress site with an installed and configured SSL certificate will change its URL prefix from http to https.

This change in URL syntax can make the WordPress site to appear inaccessible as it will be referencing the old URL starting with the http prefix.

http://linuxshelltips.com/blog → https://linuxshelltips.com 

4. Migrating to a Different Domain

When switching between different fully hosted domain names, you will want to inform WordPress of your switch to a different domain name.

https://linuxshelltips.com → https://linuxshelltips.in  

Changing WordPress Site URL via phpMyAdmin

Now that you can relate to circumstances that require you to be a master of WordPress site URL changes, it is time to figure out how to make these URL site changes in the least strenuous manner. The best candidate for this job is the phpMyAdmin site.

Access your phpMyAdmin site

http://localhost/phpmyadmin

Replace localhost with your associated domain name e.g. linuxshelltips.com.

phpMyAdmin Login
phpMyAdmin Login

Trace the MySQL/MariaDB database associated with your WordPress site and click on it. You should be able to note several WordPress database tables with the naming convention wp_.

WordPress Database Tables
WordPress Database Tables

Click on the WordPress database table called wp_options and locate the wp_options table row with the value siteurl.

WordPress Site URL
WordPress Site URL

Click on Edit and make the needed site URL edits and click [Go] to save changes.

Change WordPress Site URL
Change WordPress Site URL

Repeat the same actions for the wp_options table row with the value home.

WordPress Home Site URL
WordPress Home Site URL

Afterward, visiting your new URL; under a fully qualified domain name, should load your WordPress site without any issues.

With this brief article guide, you should not face any obstacles when your WordPress site moves to a different directory or sub-directory location, use a different fully qualified domain name, or changes its URL syntax because of SSL certificates.

Got something to say? Join the discussion.