DEPRECATED in favor of https://github.com/Automattic/newspack-docker
This is repo is no longer supported in favor of the new Automattic/newspack-docker. Please consider using that one instead.
What follows are steps to guide you through setting up a local instance for Newspack testing.
Most of the steps are one-time setup that you may or may not need to do depending on your existing configuration and what you have installed.
All of this assumes you are working on a Mac or a Linux. Before starting, be sure you have a github.com account and general experience cloning repositories. All code snippets should be run in the Terminal application.
Note: this environment was thoroughly tested with the following versions of software:
In case your versions of software don't match these, and your setup attempt does't complete successfully, please consider up- or downgrading to these recommended versions.
To determine if you have VirtualBox and which version, run:
virtualbox --version
This will open the VirtualBox application if you have it already. If not, install from https://www.virtualbox.org/
To determine if you have Vagrant already, run:
vagrant --version
If you don’t, install from https://www.vagrantup.com/downloads.html. (Download the file appropriate to your system and follow the instructions after).
As recommended by the VVV documentation:
"If you don’t reboot your machine after installing/updating Vagrant and VirtualBox, there can be networking issues. A full power cycle will ensure all components are fully installed and loaded".
reboot your computer now, and then come back to continue.
We use a Vagrant configuration called VVV for our local instances.
If you already have a directory where you like to keep repositories and other code feel free to use it, but for our purposes here we’ll create a directory called repositories
to contain everything.
Run the following steps (instructions taken from VVV docs):
mkdir ~/repositories
git clone -b master git://github.com/Varying-Vagrant-Vagrants/VVV.git ~/repositories/VVV_Newspack
cd ~/repositories/VVV_Newspack
vagrant plugin install vagrant-hostsupdater --local
Run these exact commands:
cd ~/repositories/VVV_Newspack
bash <(curl -s https://raw.githubusercontent.com/Automattic/newspack-development-environment/master/setup_newspack.sh)
vagrant up
vagrant provision
This process should have downloaded and installed all the necessary Newspack project files, inside the VVV container. In case it has failed for some unpredicted reason, consult the installation script for required steps.
In a browser go to http://newspack-dev.test/wp-admin and login with username admin
and password password
.