Coder Social home page Coder Social logo

gatsby-starter-wordpress-docker's Introduction

Gatsby v2 Starter with local Wordpress via Docker

This starter is forked from gatsby-starter-wordpress and modified to use a local WordPress installation running in Docker.

Prerequisites

Docker: https://docs.docker.com/install/

Getting Started

# clone this repo
git clone https://github.com/chrisfitkin/gatsby-starter-wordpress-docker
cd gatsby-starter-wordpress-docker
git remote remove origin

# build and run the docker containers
docker-compose up # --build

Browse your local Gatsby website.

http://localhost:8000/ - Gatsby website

Browse other local websites.

http://localhost:8000/___graphql - Gatsby schema http://localhost:8001/ - Wordpress website http://localhost:8001/wp-admin - Wordpress admin http://localhost:8001/wp-json - Wordpress API http://localhost:8002/ - phpMyAdmin

Wordpress setup

http://localhost:8001/ - Wordpress website http://localhost:8001/wp-admin/ - Wordpress admin

default username: gatsby default password: local

  • Make sure you have at least 1 post and 1 page on your WordPress site
  • Make sure at least 1 post has at least 1 tag
  • Set permalinks to Post Name at http://localhost:8001/wp-admin/options-permalink.php (this is required to enable the WordPress API and the Gatsby plugin)

MySql data

# backup
docker exec gatsby_wp_db /usr/bin/mysqldump -uwordpress --password=wordpress wordpress > ./data/backup.sql

# restore
cat ./data/backup.sql | docker exec -i gatsby_wp_db /usr/bin/mysql -uwordpress --password=wordpress wordpress

# reset to starter default
cat ./data/seed.sql | docker exec -i gatsby_wp_db /usr/bin/mysql -uwordpress --password=wordpress wordpress

Sources

This project was based on the following resources.

GatsbyCentral gatsby-starter-wordpress gatsby-starter-netlify-cms

Contributors

gatsby-starter-wordpress-docker's People

Contributors

chmac avatar chrisfitkin avatar dajocarter avatar

Watchers

 avatar

Forkers

sjohn2

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.