Skip to content

Instantly share code, notes, and snippets.

@ShinichiNishikawa
Last active June 26, 2016 14:08
Show Gist options
  • Star 14 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ShinichiNishikawa/b4d20bd8e91af8a42233 to your computer and use it in GitHub Desktop.
Save ShinichiNishikawa/b4d20bd8e91af8a42233 to your computer and use it in GitHub Desktop.
Creating a whole new Theme Review environmet in 1 minute using wp-cli
wp db reset --yes
wp core install --url=http://theme-review.loc --title="This is a really long long title to check if this theme design doesn't break with the long site title" --admin_user=admin --admin_password=admin --admin_email=example@example.com
wp core update
wp plugin install theme-check debug-bar log-deprecated-notices monster-widget wordpress-importer show-current-template customizer-theme-resizer --activate
wp plugin install wordpress-beta-tester debogger jetpack
wp plugin update --all
wp option update blogdescription "I'm in the theme review process and this is a very very long tagline to see if this long tagline text string in WordPress doesn't break the design of the theme header and else."
wp option update posts_per_page 5
wp option update thread_comments 1
wp option update thread_comments_depth 3
wp option update page_comments 1
wp option update comments_per_page 5
wp option update large_size_w ''
wp option update large_size_h ''
curl -O https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml
wp import ./theme-unit-test-data.xml --authors=create
rm theme-unit-test-data.xml
wp theme install $1 --activate
wp media regenerate --yes
wp rewrite structure '/%year%/%monthnum%/%postname%' --hard
@ShinichiNishikawa
Copy link
Author

save this as 'newreview' in your wp directory, and command ./newreview <theme-zip-uri>

To use the wp rewrite structure, you need to set wp-cli.yml file and have apache_modules: - mod_rewrite in that file.

see: http://wp-cli.org/config/

What this does and how to use.
http://th-daily.shinichi.me/2014/10/27/memo-wp-cli-commands-for-the-theme-reviewers/

@ShinichiNishikawa
Copy link
Author

@ShinichiNishikawa
Copy link
Author

added set -ex in the beginning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment