https://github.com/wpup/wp-cli-media-restore
Restore media attachments using WP CLI
https://github.com/wpup/wp-cli-media-restore
Last synced: 9 months ago
JSON representation
Restore media attachments using WP CLI
- Host: GitHub
- URL: https://github.com/wpup/wp-cli-media-restore
- Owner: wpup
- License: mit
- Created: 2015-11-21T16:23:34.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T14:22:23.000Z (over 6 years ago)
- Last Synced: 2025-08-03T07:10:02.108Z (10 months ago)
- Language: PHP
- Homepage:
- Size: 16.6 KB
- Stars: 20
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# wp-cli-media-restore
[](http://unmaintained.tech/)
Restore media attachments using WP CLI. Based on [download missing attachments](https://github.com/cftp/wp-cli-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](https://github.com/wp-cli/wp-cli/wiki/Community-Packages) wiki.
## Config
Example of `~/.wp-cli/config.yml`:
```yaml
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](https://github.com/frozzare)