Last active
October 17, 2017 20:42
-
-
Save lukecarbis/70a55dc9d2893cbbf84dc4c6873e4e53 to your computer and use it in GitHub Desktop.
Setup script for a new WordPress site
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
#!/bin/bash | |
wp plugin install jetpack theme-check user-switching gutenberg | |
wp plugin install akismet debug-bar stream --activate | |
wp core update | |
wp plugin update --all | |
wp theme update --all | |
wp comment delete 1 | |
wp post delete 1 | |
wp post delete 2 | |
wp rewrite structure '/%postname%/' | |
wp rewrite flush | |
home_id=$(wp post create --post_type=page --post_title='Home' --post_name='home' --post_status=publish | sed 's/[^0-9]//g') | |
blog_id=$(wp post create --post_type=page --post_title='Blog' --post_name='blog' --post_status=publish | sed 's/[^0-9]//g') | |
wp option update show_on_front 'page' | |
wp option update page_for_posts $home_id | |
wp option update page_on_front $blog_id | |
wp cache flush |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment