Git Product home page Git Product logo

newspack-development-environment's Introduction

Newspack Development Environment

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.

Install the Prerequisites

Note: this environment was thoroughly tested with the following versions of software:

  • VirtualBox: 6.0.4 (recommended version), 5.2.18 (minimum version required)
  • Vagrant: 2.2.5 (recommended version), 2.2.4 (minimum version required)

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.

Install VirtualBox

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/

Install Vagrant

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).

Reboot

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.

Setup the Newspack Dev Environment

Setup VVV

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

Provision VVV

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
  • note: running shorter versions of the commands instead of exactly these ones (such as 'vagrant up --provision') has sometimes shown not to execute the custom installation scripts properly

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.

Run Newspack

In a browser go to http://newspack-dev.test/wp-admin and login with username admin and password password.

newspack-development-environment's People

Contributors

iuravic avatar jeffersonrabb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.