Skip to content

Instantly share code, notes, and snippets.

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 leogopal/c83fc6cf9788d0b3bec81c73a82ef332 to your computer and use it in GitHub Desktop.
Save leogopal/c83fc6cf9788d0b3bec81c73a82ef332 to your computer and use it in GitHub Desktop.
Chained WordPress CLI commands to install and activate recommended plugins.
# wordpress-seo provides ability to edit meta information and provides sitemap.
# w3-total-cache provides advanced caching no matter the server technology available.
# better-wp-security provides brute force protection and a number of WordPress enhancements.
# google-analytics-for-wordpress provides robust Google Analytics integration through the Google API.
# redirection detects 404s and 301s and allows admins to set up redirects in the WP admin.
# ewww-image-optimizer provides automatic optimization of uploaded images with local libraries instead of cloud-based services.
# backupwordpress simple backup solution that can store backups above web root.
# relevanssi provides better site search using a local index.
# cloudflare is the best. Free automatic CDN and security solution.
# jarvis is a quick search for the WordPress admin. Indespensible.
# Array of plugin slugs as listed above. h/t @wpbullet
plugins=( wordpress-seo w3-total-cache better-wp-security google-analytics-for-wordpress redirection ewww-image-optimizer backupwordpress relevanssi cloudflare jarvis )
# Install and activate each plugin. h/t @blindpet Trevor Anderson Mike Andreasen
wp plugin install --activate ${plugins[@]}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment