To forget directory recursively add /*/*
to the path:
git update-index --assume-unchanged wordpress/wp-content/uploads/*/*
Using git rm --cached
is not good for collaboration. More details here: How to stop tracking and ignore changes to a file in Git?