Last active
August 9, 2017 23:02
-
-
Save verticalgrain/522cbe85dc8c80a7c572305c398e4b7c to your computer and use it in GitHub Desktop.
WP-Cli cheatsheet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Search-replace - multisite | |
wp search-replace --network --url=site.company.com site.company.com site.company.dev --precise | |
// Import content to multisite | |
// Look up child site urls | |
wp site list --field=url | |
// Import content, skipping attachments to save time | |
wp import --url="http://site.dev/childsitename/" contentfile.xml --authors=create --skip=attachment | |
// Flush permalinks and rewrite htaccess | |
wp rewrite flush --hard | |
// Allow mod_rewrite to allow wp-cli to rewrite htaccess | |
apache_modules: | |
- mod_rewrite | |
// Change a user to being a super admin (access multisite network settings) | |
wp super-admin add admin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment