Skip to content

Instantly share code, notes, and snippets.

@mfyz
Last active August 5, 2022 12:00
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 mfyz/2e4526cdb47450b6cad26b34367b8dc4 to your computer and use it in GitHub Desktop.
Save mfyz/2e4526cdb47450b6cad26b34367b8dc4 to your computer and use it in GitHub Desktop.
Install and configure Wordpress
# Install wp-cli
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
# Set up wordpress site
php wp-cli.phar core install\
--url=http://localhost:8011\
--title='Test Site'\
--admin_user=admin\
--admin_password=admin\
--admin_email=test@example.com\
--skip-email
# Tweaking wordpress settings
php wp-cli.phar rewrite structure '/%postname%/' --hard
php wp-cli.phar option update page_for_posts 10
# Installing and activating plugins
php wp-cli.phar plugin install kirki --activate
# Installing and activating theme
php wp-cli.phar theme activate mytheme
# Creating sample content
php wp-cli.phar post create --post_type=post --post_title='A sample post'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment