Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/imranhsayed/headless-wp-starter
:cyclone: A starter demo for WordPress Headless CMS
https://github.com/imranhsayed/headless-wp-starter
Last synced: 15 days ago
JSON representation
:cyclone: A starter demo for WordPress Headless CMS
- Host: GitHub
- URL: https://github.com/imranhsayed/headless-wp-starter
- Owner: imranhsayed
- Created: 2019-05-30T07:12:15.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-02-28T20:23:21.000Z (over 1 year ago)
- Last Synced: 2024-10-03T09:23:48.634Z (about 1 month ago)
- Language: JavaScript
- Size: 5.7 MB
- Stars: 23
- Watchers: 3
- Forks: 6
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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*T`s9Dg');` )## Demo :video-camera:
![](demo.gif)## Backend ( WordPress Dashboard ): ( http://localhost:8080/wp-admin/ )
* Start Docker for WordPress
`docker-compose up -d wp-headless`
```ruby
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
* Installs [email protected], [email protected]## 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
* Cloned from [Poslight Headless-wp-starter](https://github.com/postlight/headless-wp-starter)