Support » Plugin: WP Document Revisions » Unhash document filenames for export

  • Hi all,
    Does anyone know how to export documents with their regular filenames and not the hashed ones? We need to migrate them to a new site, but can’t find a way to transfer the filenames with the documents. Thanks for any information.

Viewing 1 replies (of 1 total)
  • It’s rather unclear what the overall process that you’re trying to do.

    However I assume that as part of the process you want a mapping from the document logical name to the encoded (hashed) name.

    This code may be of use to further your investigations:

    SELECT p.id,p.post_title, p.post_content, p.guid, m.meta_value
    FROM 
    (SELECT p.id,p.post_title, p.post_content, p.guid FROM 
     wp_posts p LEFT OUTER JOIN wp_posts r 
     ON r.id = p.post_parent
     WHERE (p.post_type = 'document' and p.post_parent = 0) 
     OR (p.post_type = 'revision' AND p.post_parent > 0 and r.post_type = 'document')
    ) AS p JOIN wp_postmeta m
    ON m.post_id = p.post_content
    AND m.meta_key = '_wp_attached_file'

    Hope this is of use,
    Neil James

Viewing 1 replies (of 1 total)
  • The topic ‘Unhash document filenames for export’ is closed to new replies.