Skip to content

Commit

Permalink
Provide extra clarity on --search-replace
Browse files Browse the repository at this point in the history
  • Loading branch information
roborourke authored Dec 4, 2020
1 parent fa10df7 commit 54fb7c3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,20 @@ Prior to WordPress 5.3.1 any image files uploaded with a file name like `example

In order to work properly and for performance reasons Tachyon requires all images to not have dimensions as their suffix.

Altis provides a migration command to rename legacy images and make the necessary database updates.
Altis provides a migration command to rename legacy images and make the necessary database updates. The command will rename images, regnerate thumbnails and update the attachment data by default. It is _highly_ recommended to pass the `--search-replace` flag to update your post content and post meta data too.

The database tables and columns the search & replace is performed on can be altered but default to only updating post content and post meta to keep the process as quick as it can be.

```
wp media rename-images [--network] [--sites-page=<int>] [--search-replace] [--tables=<tables>] [--include-columns=<columns>]
```

Recommended usage:

```
wp media rename-images --network --search-replace --url=<primary site hostname>
```

- `--network` if present will run the process for all sites on the network.
- `--sites-page` allows you to change the current page of sites. 100 sites will be processed at a time so if you have more you will need to run the command again for each page of sites.
- `--search-replace` if present will perform a database search and replace process for the updated image names.
Expand Down

0 comments on commit 54fb7c3

Please sign in to comment.