How to bulk upload images for WordPress
If you import content for your WordPress site, a major headache is to import lots of images.
I have a project recently which need to import few thousand images, usually for bulk upload images, the first plugin that comes in my mind is Add From Server, but Add From Server actually can’t handle too many images at one go, I getting lots of error when I am trying that.
Today I going to teach how to bulk upload all the images by batch – using Media From FTP. There are lots of processes need to run for upload one images and it will affect the bulk upload process. We are going to turn off those setting to speed up the upload process.
- First, we need to turn off the resize feature, you can change this under Settings – Media, change all the size to 0, this will prevent all resize process.
- Comment out the current using theme, any code that related to ‘set_post_thumbnail_size’ and ‘add_image_size’, comment out these codes will prevent the additional resize process.
- Upload the Media from FTP plugin.
- Test the “Search & Register” to make sure the plugin run without problem.
- Prepare a folder with all your images; this will prevent accidentally import other files.
- Check on the Command-line tab and follow the instruction to change some of the code.
- Test run with Command-line with a small sample to make sure the import without any issue.
- Schedule the process with the cronjob.
- Wait for all the images import; images will be deleted once imported.
- Change back Step 1 and 2 and install regenerate thumbnail plugin to regenerate all the resize thumbnail.
For my personal experience, a 2GB VPS can import ten images every 2min without affect the server performance. If you using any cache plugin ( example WP-Rocket ) turn it
Turn off any cache plugin ( example WP-Rocket ), if you keep seeing the import process didn’t run and keep showing the same messages.