How to change wordpress website Url using Sql

Changing a WordPress site domain is a common practice for developers, as you normally don’t work using what will be the final website’s URL. While I believe Backupbuddy’s plugin tools to export and import a website are by far the easiest way to move a website to a new URL, it can also be done directly on the database with this four SQL queries that:

In WP database there are 3 main tables there we need to update URL
1. Wp_post → IN wp post table we need to change guid and post content where we replace all old website url with new website url.
2.wp_postmeta → in wp post meta that stores the all post type post post meta contents. We need to update all old urls with new one.
3.wp_options→ update option Value in wp option table

http://www.webtechsource.com/example —>Old Url

http://www.webtechsource.com/demo —>New Url

 

Sql Query for updating website name:

 

 

 

Now your website url is almost changed. If faced any type of problems please post your comment we will surely help you otherwise directly contact, For more information about word press visit our Blog

I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face – we are here to solve your problems.

I, Dayanand Saini,the founder and chief editor of www.webtechsource.com,have been working as a software engineer from last 4+ years. It's my hobby to learn new things and implement on live environment.

One Reply to “How to change wordpress website Url using Sql”

  • We – and our partners – use cookies to deliver our services and to show you ads based on your interests. By using our website, you agree to the use of cookies as described in our Cookie Policy More.
    By the way! The best essay writing service – https://www.easyessay.pro/

Leave a Reply

Your email address will not be published. Required fields are marked *

22 + = 30

%d bloggers like this: