WP CLI could not create temporary file for media import

Hello,

After having downloaded a lot of images in the uploads folder without using the export/import function from Wordpress or any plugin, I would like to load them in the website.

For this, I wan’t to use WP CLI and the “media import” function. It doesn’t work with Local, because I get an error.

  • I’m opening the shell
  • I open the relevant folder : C:\Users\me\Local Sites\5by5\app\public>cd wp-content\uploads\
  • I type the command: “wp media import 2022” to import everything in this folder, and I get the following message “Error: Could not create temporary file for 2022”.

I tried to open Local as an administrator, but it doesn’t work.


I’m running these tests on Local 6.7.0, under Windows 11.
The logs are not useful because nothing related to WP CLI appears.

Hi @moodacow

Could you send a screenshot of your shell and the command/errors?

I know nothing related to WPCLI may be in your log but it still could provide us some clues. Would you mind sharing that as well? Retrieving Local’s Log File

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.