When I develop websites, I do this on a staging server.
When the job is done and the customer is happy, it’s time to move it to the production server.For reasons unknown, WordPress puts the entire site path for a post in the database. This can be a bit annyoing when moving the site. Alle posts, links and other stuff points to the staging server, not the new site.
So we need to mass replace the URL And here is ther trick ![]()
SQL syntax
UPDATE table_name SET column_name = REPLACE(‘column_name’,'original_string’,'replace_string’)
SQL example
UPDATE `wp_posts` SET `guid` = REPLACE(`guid`,’dev1.mysite.com’,'www.newcustomer.com’)
Advertisement