Skip to content

wpup/wp-cli-media-restore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wp-cli-media-restore

No Maintenance Intended

Restore media attachments using WP CLI. Based on download missing attachments with support for custom content directory and configuration in WP CLI config file.

Installation

If you're using WP-CLI v0.23.0 or later, you can install this package with:

wp package install frozzare/wp-cli-media-restore

Or, using Composer directly:

composer require frozzare/wp-cli-media-restore

For other methods, please refer to WP-CLI's Community Packages wiki.

Config

Example of ~/.wp-cli/config.yml:

media:
  restore:
    generate: false
    uploads_url: http://www.bedrock.com/app/uploads/

Options

[--generate=false]

Set this optional parameter if you want to (re)generate all the different image sizes. Defaults to not generating thumbnails.

[--uploads-url]

The URL to the uploads directory, not including any date based folder structure.

Examples

wp media restore --uploads-url=http://www.bedrock.com/app/uploads/

License

MIT © Fredrik Forsmo