Make changes in database after importing into new place/domain!

database changes after importing to new place

Make changes in database after import to live in wordpress.

Here are simple code you have to edit and paste into your domain database SQL tab and then click on GO to process it..

Here is the code

UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl';

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');


Steps to follow :-

  1. As you see the above code.. you have to change the url of the domain path as per OLD and NEW.
  2. http://www.oldurl is path of where from you want to move.
  3. http://www.newurl new path of where you want to install or move.

Also please check the table prefix of your database.. if it is started with “wp_” then it’s okay other wise change this too as per your tables.

Click here ..how to check used database table prefix

Go to database and click on the database is used.

After this click on SQL tab and paste the above code .. i mean the one you changed now as per new and old url.

Like here ..

1) Click on used database
2) Then click on “SQL” tab.
3) Then paste the code in query box.
4) After this hit the “Go” button .. right side of the query box.
5) it will show you Successfully done message when the query is completed.

That’s it .. i hope this helps you and if still has any confusion then please contact me by chat box or contact forms.

If this help you then.. Can you buy a Cup of Coffee for me by nst webcreation paypal--OR-- nst webcreation blog coffee cup

Published by

NST

Myself Narender Singh Thakur ( NST ) and i share my Experience/Knowledge and Tricks for folks and beginners to solve their issues while making websites through this Planet.

Related Articles

Leave a Reply

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

Click to Chat