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.How to Change WordPress URLs in MySQL Database Using 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.

How to Change WordPress URLs in MySQL Database Using phpMyAdmin

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".

How to Change WordPress URLs in MySQL Database Using phpMyAdmin

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.

How to Change WordPress URLs in MySQL Database Using phpMyAdmin

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.

Was this article helpful?