media:cloud-url-rewrite

This is a command to update S3 media urls in the database, useful for when you migrate S3 buckets or want to add a proxy in front of your S3 media.

Usage:

Run php artisan media:cloud-url-rewrite and enter the old and new S3 domains when prompted, or you can provide them as arguments like

php artisan media:cloud-url-rewrite old.pixelfed.example.org new.pixelfed.example.org

Notes:

Before you can update S3 media urls, you have to configure the new bucket and then re-cache configuration

php artisan config:cache && php artisan cache:clear

before you run this command You need to run

php artisan cache:clear

after the command is run to purge old S3 media urls from your cache


Disable two factor authentication for given username:

php artisan user:2fa {username}

Cleanup avatar storage:

php artisan avatar:storage-deep-clean

Make a user an admin, or remove admin privileges:

php artisan user:admin {username}

Create an invite link:

php artisan admin:invite

Fix Like counts:

php artisan fix:likes

Delete (local) media uploads that exist on S3:

php artisan media:s3gc {--limit=200} {--huge} {--log-errors}

Delete media uploads not attached to any active statuses:

php artisan media:gc

Delete password reset tokens over 24 hours old:

php artisan gc:passwordreset

Create a new user:

php artisan user:create {--name=} {--username=} {--email=} {--password=} {--is_admin=0} {--confirm_email=0

Delete account:

php artisan user:delete {id} {--force}