Download Monitor
SQL query deleting file urls (3 posts)

  1. sta777
    Posted 1 year ago #

    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?


  2. neonek
    Posted 1 year ago #

    I'm having the same problem. I search and replace the SQL file on my text editor and when I upload my database I have the same problem, the file urls are deleted...

    Have you found a solution?


  3. sta777
    Posted 1 year ago #

    Hahaha not really; end up manually changing the file urls to the new address first, then doing the sql replaces.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic