wp-theme-rename-cli v0.1.1
WP Theme Rename CLI
Command line tool that renames WordPress themes.
Installation
npm install wp-theme-rename-cliRequirements
Theme must have the style.css with the proper Theme name and Text domain declarations.
How to use
From the same folder with the style.css run the following command
wp-theme-rename -s=slug -n=NameThis command will rename all prefixes, handles, text domains, Dockblock comments and other things with the ocurrances of the theme name.
Parameters
-s Reqired. New slug for the theme.
-nReqired. New name for the theme.
-folderExcludeOptional. Coma-separated list of folders to exclude from renaming. The default list of excludede folsers is node_modules, .git, .sass-cache, .hg, .svn, .CVS, cache.
-fileExcludeOptional. Coma-separated list of files to exclude from renaming.
-extensionsOptional. Coma-separated list of files to exclude from renaming. The default list of extensions is php, html, js, json, css, scss, sass, txt, md, pot.
Examples
Let's say you want to reanme some theme to Buster with a buster slug.
wp-theme-rename -s=buster -n=Buster -folderExclude=template-partsRename the theme but leave the template-parts folder intact.
wp-theme-rename -s=buster -n=Buster -fileExclude=functions.phpRename the theme but leave the functions.php file intact.
wp-theme-rename -s=buster -n=Buster -extensions=phpRename only php files.