Skip to content

Instantly share code, notes, and snippets.

@kadimi
Last active October 29, 2023 06:46
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadimi/f8e022e90bd4ece59c3cd9d1b0b30f30 to your computer and use it in GitHub Desktop.
Save kadimi/f8e022e90bd4ece59c3cd9d1b0b30f30 to your computer and use it in GitHub Desktop.
Install WordPress with WP-CLI (for Scotch Box)
# CD to the document root.
cd /var/www/public/
# Update WP-CLI if needed.
sudo wp cli update --allow-root --yes
# Download WordPress if needed.
wp core download
# Create configuration file.
wp core config \
--dbname=scotchbox \
--dbuser=root \
--dbpass=root \
--dbhost=localhost \
--dbprefix=wp_
# Run install on the database.
wp core install \
--url="http://scotchbox" \
--title="Scotch Box" \
--admin_user="admin" \
--admin_password="password" \
--admin_email="admin@example.com"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment