When moving a local site to a live site, the file urls for all of my downloads get deleted when running sql queries to update wp_postmeta.
The only way I can move my site without having all of the file urls removed is by manually changing each of them to the new url once I have moved the site.
The exact query is below:
UPDATE wp_postmeta SET meta_value = replace(meta_value, 'http://localhost/sitename', 'http://www.sitename.co.uk');
Surely this shouldn't happen?