Skip to content

Instantly share code, notes, and snippets.

@vanpariyar
Last active April 18, 2022 09:04
Show Gist options
  • Select an option

  • Save vanpariyar/157cfd883dcef99707b749fdaacf6883 to your computer and use it in GitHub Desktop.

Select an option

Save vanpariyar/157cfd883dcef99707b749fdaacf6883 to your computer and use it in GitHub Desktop.
Linux: WordPress development setup script

Apache2

sudo apt install apache2

PHP

sudo apt-get install libapache2-mod-php php php-common php-curl php-dev php-gd php-pear php-imagick php-mcrypt php-mysql php-ps php-xsl

MySQL

sudo mysql
CREATE USER 'hari'@'%' IDENTIFIED BY 'hari';
GRANT ALL PRIVILEGES ON *.* TO 'hari'@'%' WITH GRANT OPTION;

WP CLI

wp cli update
sudo apt install curl
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
php wp-cli.phar --info
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
wp --info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment