When migrating a site, I always first figure out what I have access to. For some sites, we don’t have access to anything (WordPress, database, files). Since I could log in to this site, I used UpdraftPlus to make a backup of the database, the plugins, and the themes, and I imported these into a local development site using UpdraftPlus just fine. Unfortunately, the Uploads folder was too big. Usually there is always one things that chokes up a project.
I created a PHP function to grab all the images from the WordPress website. The function used the XML file that the WordPress Media exporter made. This was definitely the most difficult part of migrating the website.
I had to use the method above because, like I said, the Uploads directory was too large (650mb) for UpdraftPlus, DropBox Backup, or any other plugin that I tried. Using UpdraftPlus, I tried backing up the Uploads folder to a DropBox folder and another website, but neither worked. I was not even able to download the folder using UpdraftPlus.
Since the script above recreated the folder structure of the images, I was able to swap out the folder on the new site with the wp-content folder that my function created. The script retrieved about 330 images (about 330), but the actual amount was 6,800 (original image + thumbnails). I don’t really like how WordPress does that. Pre-created themes from Envato seem to do this a lot. This theme added about twenty additional image sizes causing the number of images to go up to 6,800. I had to push the site to a server soon so I used the script below to disable the extra image sizes, for now.
I removed the Uploads file with way too many images and tried, again. I regenerated the thumbnails for each image using the Regenerate Thumbnails WordPress plugin. This time, it only generated about 1000, and I was able to push the site to the server much faster. Only about five images on the site had to be replaced after removing all the additional image sizes. So, what were all those additional image sizes for? It’s beyond me.