How To Change WordPress Site URL From Database: MySQL?
July 11th, 2016 | by Ravi Chahar || 4 Comments |
In the previous post, I have mentioned about the site URL and how to change WordPress site URL. I have mentioned the three ways from which the last one should be elaborated. In this post, I am going to tell you the specific method to change WordPress site URL in database.
When you change the domain name of your website then you have to redirect your old domain to the new one. But the links of the images won’t appear good. It’s because if you don’t change WordPress URL in MySQL, your website won’t look the way you want.
Change WordPress URL In MySQL Database:
You all know that using the database of your website, you can change the admin username and can change the password for your WordPress admin panel. Before changing any field of the database, it’s always recommended that you should backup the database.
If you want to use the database method for changing the URL for your website then you have to follow few steps. I am going to provide the guide from an initial point to the final destination.
Step 1:- Login to the web hosting account. Then go to the cPanel of your website and look up for the database section. Many options will be showing to you. you have to click on the “phpMyAdmin” option and a new tab will open for you.
Step 2:- In the left-hand side. you can see the name of the databases you have created for your website. If you have multiple websites on the same web hosting then you should search for the name of the database of the domain for which you want to change WordPress URL in database.
Step 3:- After clicking on the database, you will see many rows of the tables in front of you. You have to search for a special row in the table. Search for “wp_options” You can see this file after exploring the content of your database in the left-hand column.
Step 4:- Click on the “wp_options” and you can see a table with many rows. The first row is for you. Using this row, you can change the URL for your website. You can see under option_name and option_value. You have to fill the option_value for your website. Just click on the “edit” option and the details of the row will be showing to you.
Step 5:- This is the final step, you should take. Place the URL of your website in front of the option_value field. I have shown here the boxes to fill. You don’t need to play with any other field. Just enter the URL in the required field and your motto to change WordPress site URL in MySQL would be successfully accomplished.
Don’t forget to save the details. After filling the URL in the required box, you should click on the “Go” button. As you can see that it shows that you will be taking to the previous page after saving the details you have filled.
Would You Use The Database to Change WordPress URL In MySQL field?
From the method of editing the .htaccess file to relocate. To change WordPress site URL in MySQL database option is there for you. When you are locked out of your WordPress admin panel then you should use this method. Many people are there with the problem of refreshing the wp_admin page or the locked away a problem. The best solution to change WordPress URL in database is available.
Do you still fret about using the cPanel and the database’s section? Well, you have to go for it. Your problem will be solved after following the above-mentioned steps. If you still face any problem then I would be happy to help.
You can also connect with us Twitter, LinkedIn, and Facebook.
Great article, Ravi.
Till today, I was changing URL for my WordPress site using the general settings in the dashboard. Thanks for the article as I got to know that it can be done easily using SQL as well.
Thanks again, Ravi.
Hey Naven,
You can change the URL from your general settings. But what will you do if you can’t login your admin panel? In suck situation, you should use the cPanel. I am glad that you found this article helpful.
Thanks for stopping by.
Have a great day.
~Ravi
Hi Ravi,
Another excellent post along with step by step tutorial regarding Changing WordPress Site URL In Database: MySQL. The thing which i like the most in your WP Tutorials that you have explained every step in detailed with the help of this every one can easily implement and made important changes to their blogs.
Keep sharing ?
Regards
Mairaj
Hey Mairaj,
People need to get the easiest method to solve their problem. I mean what’s the use of an article if it’s not worth to your readers. In the beginning of blogging, most of the bloggers don’t really have keen interest to go through hard tutorials.
So, it’s necessary to maintain their interest by making things easier.
Thanks for sharing your words.
Have a good day.
~Ravi