i have URL in db column "guid"
http://example.com/wp-content/uploads/2014/03/Waterproofing2.png
i need to change it to
http://example.com/blog/wp-content/uploads/2014/03/Waterproofing2.png
i need to replace all URL's with
http://example.com/wp-content/uploads/
to
http://example.com/blog/wp-content/uploads/
Heya easiest way to do that is using replace function in sql
simple
REPLACE
performs comparisons based on the collation of the input. To perform a comparison in a specified collation, you can useCOLLATE
to apply an explicit collation to the input.In SQL, wildcard characters are used with the SQL LIKE operator.
SQL wildcards are used to search for data within a table.
With SQL, some of the wildcards are:
so Quickest Way Use CONCAT: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat
So an example from a friend , change the following
to this
CODE:
I always use this query for WordPress database moves
Use the replace function: