RL

Menu

Virtualbox & WP-CLI

Today I wanted to take my new knowledge of SSH a little further, so I created a Virtual Machine, installed Ubuntu and then installed Apache, PHP, and MySQL. I then installed WordPress and accessed it from my local machine by adding a hostname in my hosts file mapped to the IP of the VM.

After that I wanted to look into WP CLI, so I installed that and had a quick play.

This is a draft list of the steps I took

 

Install VirtualBox

Create Ubuntu VM

Connect via SSH

Add SSH Keypair

// On local machine, (in terminal)
cd ~/.ssh
// Create a keypair (if not there already).
// Copy contents of key to clipboard
cat id_rsa.pub | pbcopy
// SSH to server
ssh user@server
enter password
// Create .ssh folder
mkdir .ssh
cd .ssh
// Create file and paste clipboard contents into it
nano authorized_keys
// Paste contents, ctrl X to save and exit
exit
ssh user@server
// You should be logged in automatically

install apache

install php

install mysql

download WordPress core using wget

extract the tar file

move the contents to the root folder

edit ownership and permissions
sudo chown -R www-data:www-data wp-content

Create a DB using PHPmyAdmin

install WP via the wizard

Install and play with WP-CLI

Leave a Comment

Your email address will not be published. Required fields are marked *