Replace function sql
-
Hi,
I have a question about the replace function in sql.
I’ve moved my site and now I would like to replace the URL’s
this is the code I added, but it doesn’t seem to work
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’);
Can somebody help me with this please?
thx
-
Hello standoutfromthecrowdcommunication,
The changes you are trying to make relates to a self-hosted installation of WordPress. You will need to seek help in the appropriate WordPress.org support forum, as this support forum is for blogs hosted at WordPress.com.
- The topic ‘Replace function sql’ is closed to new replies.