Rename WordPress’ Database Prefix with WP-CLI

I wanted to update the database prefix one this site, but most of the tutorials out there have you do it manually. There are some plugins available, but I didn’t trust most of them, and the ones that I did were kind of bloated with other features, and I didn’t want to mess with the cleanup, etc.

So, I wrote a WP-CLI command to do it instead.

Install: wp package install iandunn/wp-cli-rename-db-prefix
Use: wp rename-db-prefix new_prefix_

 

Leave a Reply

Your email address will not be published. Required fields are marked *