Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

table-prefix

WP CLI command for changing table prefixes. In addition to changing the table prefix the wp-config file will also be updated. A back of the wp-config file is saved to wp-config.bak.php in case something go awry.

##Commands

change changed the prefix of the tables in the database to , unless specified otherwise the default prefix will be used (see: show)

show shows the current prefix the database object thinks it is using ($wpdb->prefix)

##Example Usage

wp table-prefix change notwp_

run as a one off (not added as a wp-cli command) wp --require=../commands/table-prefix/table-prefix.php table-prefix change new_

##Future Enhancment Ideas

  • Enhanced multisite support, currently only changes main table prefix and doesn't allow you to change the site prefix (ex. wp_2_site can change to x_2_site but not wp_x_site)
  • Moar docs

About

WP CLI command for changing table prefixes

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages