I was at #wcsf14 and at theme review team table in contributor day room 🙂
Every time I begin a new theme review, I need to set up a whole new environment, ideally. People seems to do reviews in same install, same database only changing the theme.
After reading http://www.chipbennett.net/2011/04/20/a-guide-to-reviewing-themes-for-the-wordpress-theme-repository/ , I created this script with wp-cli commands.
What this script does is:
- drop all database tables
- install WordPress with long blog name, url, loginname, password and email
- core update
- install plugins to activate
- install plugins to install without activation
- update all plugins
- update all themes
- set the blogdescription very long
- set posts_per_page, thread_comments and other options to appropriate values
- download the theme unit test data and import it
- install the theme you review this time
- regenerate all the medias
- set permalink structure and generate .htaccess
How to use
save the gist script above as newreview and command below
$ ./newreview <theme-zip-url>
Generating .htaccess in step.13 requires a wp-cli.yml in your WP directory with a line
apache_modules: - mod_rewrite. If you already have an .htaccess file, you don’t need to have this yml file.
This is meant to be used on your local server so please don’t put it on remote servers.
This is what you get when you run the script.
Have fun! Remember to update the passwords and roles of imported users. Success: Finished importing from ./theme-unit-test-data.xml file. Downloading install package from https://downloads.wordpress.org/theme/spacious.1.2.1.zip... Unpacking the package... Installing the theme... Theme installed successfully. Activating 'spacious'... Success: Switched to 'Spacious' theme. Found 37 images to regenerate. Regenerated thumbnails for "spectacles" (ID 1692). Regenerated thumbnails for "dsc20050315_145007_132" (ID 1691). (process omitted by shin, it regenerates many many images) Regenerated thumbnails for "dsc20050727_091048_222" (ID 616). Regenerated thumbnails for "canola2" (ID 611). Success: Finished regenerating all images. $