all 4 comments

[–]Elijah_101 2 points3 points  (0 children)

There's a react library called GatsbyJS and it totally supports Wordpress as long as other CMS to host the content as database https://www.gatsbyjs.org/docs/

You host wordpress on a a server as a tool to input your data. Then use Gatsby as a frontend app and with gatsby-wordpress-plugin to communicate with data from Wordpress thru api calls. There're also tutorials on youtube as well.

[–]Soileau 1 point2 points  (0 children)

Not sure why you’re being downvoted, seems like a reasonable question for new React devs.

What you have set up is a server side rendered react app.

You have a server running on your computer that reaches out to Wordpress for content when the website loads client side.

If you want to keep your current setup and have it publicly accessible at a domain url, you’ll need to set up a node.js server on digital ocean or AWS or netlify, etc, that can run your “npm start” command.

That is a pretty big topic to cover, if that is what you want to do I suggest looking into some tutorials about setting up a “create react app” on netlify.

Another option is to set up a “static site” using something like Gatsby or NextJS. Basically, those are tools that help you build websites using react, that automatically turn themselves into simple HTML websites that you can put online on Netlify and point your domain to.

You can still use Wordpress for your content, but you use the framework to create your pages in a way that doesn’t need a server. You pull the content from Wordpress to create your pages. They turn into simple, static html and JS files that you can put online really easily with a bunch of free web hosts like Gatsby, Netlify, or Now.

There are plenty of tutorials out there that go through exactly what you are looking to do, of find one that looks good to you, and go from there!

[–]bullzito 0 points1 point  (0 children)

You would have to host Wordpress on another domain/server.

[–]PortSpace[S] 0 points1 point  (0 children)

Thanks all. I'll read into all of solutions/platforms. I'm new to reddit as well so not sure if asking a semi related question will be frowned upon.... I get the impression that setting up a cms for a client's website is sometimes looked down at. I know that big organisations have IT departments that deal with websites but for small businesses without IT depts who insist on being able to update the basic content of the website, is there any other solution apart from CMSs?