Do I need to re-register all my images in the media library after a migration?

I’m moving a 6+ years running WordPress site to a new (Azure VM / LEMP) server, taking the time to upgrade Ubuntu, Nginx, etc, and trying to clean up years worth of grunge. ~20 authors, 40k posts, 6+GB of images, etc.
I’m moving things over manually, copying the uploads folder over, so the images aren’t registered in the Media Library. I’m looking at some plugins to help, but am wondering if it’s necessary to re-register all the old images into the Media Library? They’re all properly linked in the posts, etc.
So, wondering what kind of performance gains, if any, I would get from just not bringing (most of) the images back into the Media Library? Most of these will never be used again (the ones that will I will def get into the ML). Is it worth the bother?

Answers:

Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.

Method 1

Assuming your old site is still accessible, I would just go Tools -> Export and create an export file containing your media.

In the new WordPress server, import the file and select the option to “Download and import file attachments”. (your old site needs to be public for this to work).

This seems to be good guidance: https://www.itjon.com/moving-posts-and-media-between-wordpress-blogs-with-wordpress-importexport/

If you just copy the uploads folder, WordPress knows nothing about this and all your image references will be 404. Even if you import the media by dragging everything from your uploads folder from old site, they will have different IDs, so I would advice to follow the import method.

Once you have done this, you might want to use a plugin to find stale images and remove them. There probably is a performance gain from getting rid of image references that are somewhere in the database.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x