It is much better to use the store variable for links than hard coding as it makes moving content between dev, live and staging sites easier and more accurate.


To find and replace in Magento CMS blocks and CMS pages content use the following SQL in the database or in Mag Manager


Set the replace string as {{config path="web/secure/base_url"}} for replacing URL strings that are hard coded.  You can also use this find and replace for any strings in the content of the CMS blocks and pages. 


SET @find_string := 'https://staging.buildingmaterials.co.uk/' ;
SET @replace_string := '{{config path="web/secure/base_url"}}' ; 
update cms_block set content = replace(content,@find_string,@replace_string);
update cms_page set content = replace(content,@find_string,@replace_string) ;


If you want to run the same script in MagManager you can use this is the Custom SQL section


SET @find_string := 'https://staging.buildingmaterials.co.uk/' ; /*DELIMITER*/
SET @replace_string := '{{config path="web/secure/base_url"}}' ; /*DELIMITER*/
update /*PREFIX*/cms_block set content = replace(content,@find_string,@replace_string); /*DELIMITER*/
update /*PREFIX*/cms_page set content = replace(content,@find_string,@replace_string) ; /*DELIMITER*/


Remember to take a back up before doing this as you are dealing directly in the database.