Skip to content

Instantly share code, notes, and snippets.

@pattonwebz
Last active November 12, 2017 18:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pattonwebz/8e4f40adb4516f6226270a7257385dfc to your computer and use it in GitHub Desktop.
Save pattonwebz/8e4f40adb4516f6226270a7257385dfc to your computer and use it in GitHub Desktop.
called with: sh reset.sh {url to theme zip file}.
#!/bin/bash
# clear databse
wp db reset --yes
# Install WP with long title
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
# Update wp.
wp core update
# Add some plugins, activate some, update all.
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
# Add and activate thene sniffer plugin from Github.
wp plugin install https://github.com/WPTRT/theme-sniffer/releases/download/0.1.4/ns-theme-check.0.1.4.zip --force --activate
# Set a long descrption.
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."
# Set pagination/comments/image settings.
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 ''
# I have test data file in the root of the wp folder already, you could download fresh each time with curl.
#curl -O https://wpcom-themes.svn.automattic.com/demo/theme-unit-test-data.xml
# Import test data.
wp import ./theme-unit-test-data.xml --authors=create
# Optionally remove unit test file.
#rm theme-unit-test-data.xml
# Install theme for review.
wp theme install $1 --force --activate
# regen thumbnails based on new theme sizes and set permalinks
wp media regenerate --yes
wp rewrite structure '/%year%/%monthnum%/%postname%' --hard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment