Git Product home page Git Product logo

wp-photon's Introduction

Local WordPress Photon server (for development)

Photon documentation

Please refer to https://jetpack.com/support/photon/

Requirements

This project requires Docker, download and install it from https://www.docker.com

Installation

Clone repository to your local machine.

Switch to the project directory and run the following command: docker-compose build. Docker Compose will pull PHP Apache image from https://hub.docker.com/_/php/ and then it will build Photon image. It will take some time.

Configuring hosts

See your /etc/hosts file: you will need an IP address used by Vagrant and configured host names.

Copy docker-compose.override.yml.sample into docker-compose.override.yml and updates hosts listed there.

Note: extra_hosts must be an array of "host:IP" mappings.

Configuring WordPress

To change default Photon domain in the WordPress you need to register a new filter like this:

add_filter( 'jetpack_photon_domain', function() {
	return 'http://192.168.99.100/';
} );

Note: to get an IP of the Docker, run docker-machine ip.

Also, to enable Thumbnail Editor plugin you need to force load it:

\wpcom_vip_load_plugin( 'wpcom-thumbnail-editor' );

Running Photon

Use the following commands to run Photon:

  • docker-compose up - runs Photon server in foreground
  • docker-compose up -d - runs Photon server in background
  • docker-compose down - stops server and removes Docker container (it will be recreated back when you start Photon again).
  • to see logs from the service running on background, use docker-compose logs. Run docker-compose logs --help for more help on other parameters
  • docker-compose ps to see running services

wp-photon's People

Contributors

romanatnews avatar

Stargazers

Chris Zarate avatar Ján Bočínec avatar

Watchers

James Moey avatar James Cloos 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.