GithubHelp home page GithubHelp logo

aderaaij / wp-headless Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 150 KB

Headless WordPress installation based on Bedrock

License: MIT License

Shell 6.37% PHP 55.53% Ruby 36.33% CSS 1.78%
wpgraphql capistrano bedrock composer wordpress-installation wordpress headless-cms headless-wordpress

wp-headless's Introduction

WP Headless - A 'headless' WordPress installation

A roots/Bedrock based WordPress installation to easily spin-up and deploy a headless WordPress installation to use as Headless CMS for your JAMStack site.

๐Ÿ“ƒ Description

WP Headless is a barebones, yet versatile installation of WordPress to use as a headless CMS for all your JAMStack needs. It includes WPGraphQL for exposing a GraphQL API and includes a headless theme which redirects users to the admin and the WP Vercel Deploy Hooks plugin to dynamically deploy your Vercel project from your WordPress site.

๐Ÿงณ Features

  • The usually cool stuff brought by roots/Bedrock like:

    • Easy dependency management of themes, plugin and the WordPress core through Composer
    • Better WordPress folder structure
    • Easy WordPress configuration for different environments with .env files
  • WPGraphQL - Exposes a GraphQL endpoint as a data source for your JAMstack site

  • WP Headless Theme - A 'headless' theme which disables the front-end and redirects users to the login / admin area

  • WP Vercel Deply Hooks - Plugin to deploy your Vercel project dynamically

  • Easy deploy with roots/bedrock-capistrano

๐Ÿ“ฆ Requirements

๐Ÿ›  Installation

  1. Clone the repository (git clone [email protected]:aderaaij/wp-headless.git)
  2. Rename the .env.example in the project root to .env
  3. Fill in required credentials in the .env file (equal to your wp-config.php in a regular WP install):
    • Database variables
      • DB_NAME - Database name
      • DB_USER - Database user
      • DB_PASSWORD - Database password
      • DB_HOST - Database host Optionally, you can define DATABASE_URL for using a DSN instead of using the variables above (e.g. mysql://user:[email protected]:3306/db_name)
    • WP_ENV - Set to environment (development, staging, production)
    • WP_HOME - Full URL to WordPress home (https://example.com)
    • WP_SITEURL - Full URL to WordPress including subdirectory (https://example.com/wp)
    • AUTH_KEY, SECURE_AUTH_KEY, LOGGED_IN_KEY, NONCE_KEY, AUTH_SALT, SECURE_AUTH_SALT, LOGGED_IN_SALT, NONCE_SALT
  4. Point the webserver root to the /path/to/site/web/ folder
  5. Access WordPress admin at https://example.com/wp/wp-admin/

๐Ÿš€ Deploying

This install includes the Bedrock Capistrano deployment scripts to easily deploy your site.

โš ๏ธ This requires remote SSH access to your server. If you don't have SSH access, you might be able to try Capistrano with LFTP, and let me know how it goes ๐Ÿ˜…

๐Ÿ“ฆ Requirements

  • SSH access
  • Ruby >= 1.9

Required Gems:

  • capistrano (> 3.1.0)
  • capistrano-composer

๐Ÿ’ช Usage

  • Deploy: cap production deploy
  • Rollback: cap production deploy:rollback

Composer support is built-in so when you run a deploy, composer install is automatically run.

Symlinks

Symlink shared upload folders: ln -s /home/91934.cloudwaysapps.com/gfqrxtbxbj/public_html/wp-headless/shared/web/app/uploads /home/master/applications/gfqrxtbxbj/public_html/wp-headless/current/web/app/

wp-headless's People

Contributors

aderaaij avatar

Watchers

 avatar  avatar

Forkers

carolburri

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.