Update WordPress (and not only) MySQL database with simple SQL script

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Let’s say You have moved Your WordPress CMS to another hosting and You need to change path’s too.

UPDATE wp_options 
SET option_value = 
REPLACE (option_value,'/home/-httpd/mydomain/','/www/var/domain2/');

You can use this not only with WordPress, but other systems too:

UPDATE table 
SET column = 
REPLACE (column,'/home/-httpd/mydomain/','/www/var/domain2/');
VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title="" rel=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>