I have a Wordpress installation that I want to reinstall. However, I also have in it several uploaded files (.doc and PDFs) that are linked by external sites. They are not used in any of my own pages: I just uploaded them to my Wordpress site instead of putting them in a Dropbox or a Google Drive, and now I can't (or shouldn't) delete them.
The good thing: they are all on the same directory: /wp-content/uploads/2020/07/
, so I could just delete everything, reinstall Wordpress and then upload the files to the same directory... However, I don't like the idea of having stray files in my Wordpress installation without WP knowing about them, so I would also like to keep the DB entries that keep track of those files.
If I'm not mistaken, the attachments are kept in the wp_posts
table, so what I would have to do is:
- Dump all the
wp_posts
entries referring to the attachments. - Dump all the
wp_postmeta
entries referring to the entries inwp_posts
. - Inserting those entries by hand in the new Wordpress' tables.
Is there anything I'm missing? Any other place in the Wordpress DB where there might be information?