Skip to content

Headless Wordpress using React and Next.js with WPGraphQl and Apollo GraphQl in place of the traditional rest API!

Notifications You must be signed in to change notification settings

bdevo1896/wordpress-react-site-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Mango Nerd Sample Site Project!

Welcome to my first real public repo! This is for anyone looking to get into Next.js, GraphQl in React and using Wordpress headless!

Tech Used with Links

  • Next.js Getting Started
  • Apollo GraphQl for React Getting Started
  • Express
  • Wordpress Plugins
    • Advanced Custom Fields Pro (Add Yourself - this is a must have for any wordpress dev)
    • CPT UI
    • The SEO Framework
    • WPGraphQl Docs | Playground (Honestly more useful than the docs right now)
    • WPGraphiQl (An interface to try out your queries!)

Other Tools Needed

  • Docker (If you're on windows then you must upgrade to Windows 10 Pro)
  • Node.js 5 or higher
  • A great IDE (Highly recommend Visual Studio Code!)

Getting Started

  1. Clone the repo
  2. Open Site folder in VS Code
  3. Open a new Terminal and cd to ui folder
  4. Run the command: yarn install or npm install
  5. Open a Terminal and run the command: docker-compose up
  6. Go back to ui in a terminal
  7. Now run the following commands
  • If Using Yarn
    • Windows: yarn start-win
    • Linux: yarn start
  • If Using NPM
    • Windows: npm run start-win
    • Linux: npm run start

You now should be up and running and seeing it all in motion!

  • You can locate the React App on localhost:3000
  • Wordpress Admin on localhost:4000/wp-admin (user: admin | password: password)
  • SQL Database is runnning at localhost:3306
  • PHPmyadmin is running at localhost:5000 (user: root | password: password)

I will continue to come back to this project to keep it updated with best practices! Don't be afraid to message me for any questions you might have! The code is heavily commented for your convenience!

About

Headless Wordpress using React and Next.js with WPGraphQl and Apollo GraphQl in place of the traditional rest API!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published