How to Change WordPress URLs in MySQL Database Using phpMyAdmin

How to Change WordPress URLs in MySQL Database Using phpMyAdmin

When you decide to change your site’s address, you have different options to do so. Sometimes, when you do it from your site’s dashboard, it might not work properly. So, the best solution is to use the MySQL database of your WordPress site.

In this tutorial, you will have a step by step guide that will help you change WordPress URLs using phpMyAdmin. I understand it can be a little bit technical, but there’s nothing to worry about.

Before you start, I suggest you have a backup of the database for safety.

Steps to Edit Site URLs From The Database

Editing the database can be overwhelming. So, please be careful while following these steps.

Step 1).

Access your web hosting account and open cPanel. 

Search for the database section and open phpMyAdmin.

Step 2).

After a while, the system will redirect you to the phpMyAdmin dashboard. 

From the left-sidebar, click on the database name.If you have multiple sites, please ensure that you open the database of your current site you’re trying to make changes to.

Step 3).

You will see many database tables on the main content area.

Search for the wp_options table. 

 

Note: For security reasons, many users or security plugins change the prefix from wp_ to something else. So, look for _options.

Step 4).

Once you open the wp_options table, you will see many rows and columns.

Under “Option_name” look for “siteurl”. 

 

Click on the “Edit” link from the left.

Step 5).

You will see the current URL of your site. You have to

update it with the new site address. 
 

It will be for the “option_value” field.

Step 6).

Click on the Go button that’s visible at the bottom of the site address box. 

Step 7).

Come back to the “wp_options” table content and edit “Home” because that’s also your site’s address. 

Follow the same procedure you follow for “siteurl” and save changes.

Once you do it, check your site after clearing your browser’s cache and cookies. Sometimes, the old data prevents you from seeing the updated version of a site.

Please note that links to the old address of your site might be broken. To fix them, you might need to install and activate a redirect plugin. However, there’s no surety of it. You have to search for broken links using an online tool.

Conclusion

Was it so hard to change WordPress URLs in MySQL database? Following a simple few steps isn’t so difficult.

You have to be careful about editing anything else instead of the wp_options table content. I suggest you check the screenshots properly.

How to Change Your WordPress Password using phpMyAdmin

This is a step-by-step guide that shows you how to change your WordPress passwor
2 min read
Angela Olaru
Angela Olaru
Senior Writer & Hosting Expert

How to Backup your Database of Custom Tables Using phpMyAdmin

This tutorial teaches you how to back up your database tables, excluding those c
3 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Change your WordPress Theme using phpMyAdmin

This article will show you how to switch your WordPress theme using phpMyAdmin.
2 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Delete Extra Database Tables After Uninstalling a WordPress Plugin

Not all the plugins come with an option to delete all the settings
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.
Click to go to the top of the page
Go To Top