GithubHelp home page GithubHelp logo

mycosavant / headless-wp-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from imranhsayed/headless-wp-starter

0.0 0.0 0.0 5.83 MB

:cyclone: A starter demo for WordPress Headless CMS

Shell 4.85% JavaScript 69.66% PHP 17.40% CSS 2.47% HTML 2.74% Dockerfile 1.57% SCSS 1.31%

headless-wp-starter's Introduction

Headless WP Starter

Installation :pointer:

  1. Install Docker
  2. git clone [email protected]:imranhsayed/headless-wp-starter.git
  3. cd headless-wp-starter
  4. docker-compose up -d
  5. Once install add this to your wp-config file ( define('JWT_AUTH_SECRET_KEY', '&BZd]N-ghz|hbH=%~a5z(mR=n%7#8-Iz@KoqtDhQ6(8h$og%-IbI#>N*Ts9Dg');` )

Demo :video-camera:

Backend ( WordPress Dashboard ): ( http://localhost:8080/wp-admin/ )

  • Start Docker for WordPress

docker-compose up -d wp-headless

username: nedstark
password: winteriscoming 

Front End: ( http://localhost:3000 )

  • Install packages and start the front and server

cd frontend && yarn && yarn start

  • Start Front end server

cd frontend yarn start

What it does:

  • Pulls the image from library/wordpress and downloads latest wordpress
  • Switches to 'Postlight Headless WordPress’ theme, deletes the default themes and default plugins

For wp-headless:

  • Installs and activates ACF, acf-to-wp-api, wordpress-importer, WP-REST-API V2 Menus, jwt-authentication-for-wp-rest-api, wp-graphql, wp-graphql-jwt-authentication, wp-migrate-db-pro, wp-migrate-db-pro-cli, wp-migrate-db-pro-media-files
  • sets up mysql, php unit test
  • Pulls the image from library/node, sets up up next js

For Frontend

The packages/plugins used:

1. wpapi npm package

  • An isomorphic client for the WordPress REST API, designed to work with WordPress 5.0 or later. It works both on the server or in the browser Once an instance is constructed, you can chain off of it to construct a specific request. (Think of it as a query-builder for WordPress!) They have an extensive API documentation

Create a Woocommerce REST API Key

  • WordPress Dashboard > WooCommerce > Settings > Advanced > REST API > Create an API Key

Credits

headless-wp-starter's People

Contributors

imranhsayed avatar dependabot[bot] 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.