Fastest way to register 600,000 images with WP Media Library?

[ad_1]

So, I am rebuilding a website and it has over 600,000 images (yay me) I've uploaded them via FTP to uploads folder, however now it seems I need to tell WP they are there…

I am doing a WP CLI command via SSH terminal, however it takes ages, is there a faster way?

I've looked at the plugins but they're even slower, and typically crash.

[ad_2]
2 Comments
  1. Wrap the wp-cli in a shell script to iterate (for-loop) across all images to import them that way.

    Do a small test sample first obviously, and backup before!

  2. i’d create a JSON file of the relevant data (current file URL, title, alt text, etc) and then run a CLI command to read the file in batches and run it though `wp media import`

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer