Explore WordPress RESTful API

New year, new beginnings. With a new PC setup and finally a blog post on the site this year. While I was thinking about setting up a new design for https://nankov.mk I came up with a new idea. How about I move away from the old setup with React (Web, Admin) and Lumen API and move to Laravel with WordPress REST API + Admin panel.

So what will cover the new setup

  • SEO witch is important for better finding the site on google (on the Laravel side)
  • Google Analytics – to check visitors and see charts (on the Laravel side)
  • Admin panel which is supported out-of-the-box from WP
  • Some plugins like
  • Laravel Cache – At the end, I did some benchmarks. The average load was more than 3.5 sec but with cache, I am getting 274 ms page load. Sounds nice right?
  • Feedback and chat integration (on the Laravel side)

I am pretty amazed by what WP can offer. Basically, this is more than enough to make https://nankov.mk look cool and content-rich. But why did I decide to make this kind of setup?
Because I want to explore and find out that there is NO limitation on what I can do with these plugins.
And the power lies in “Custom Post Type UI” where you can create a model and for that model with “Advanced Custom Fields” and custom attributes where you can add them per created model. And the output is like you’re getting a new table with attributes where you can make CRUD operations by the WP Admin panel and with additional plugins you cover the same for REST.

I must say that for my setup populating the data took more time than creating the API. The API was like 2 hours of work. It’s crazy. So, the Laravel app was only an added value to make it all work and an additional setup for comments or taking feedback for the site.

For any awesome staff, there are also pros and cons.
So, from this perspective the cons will be:

  • What if these plugins do not cover the new version of WP?
  • What if some plugin got deprecated?
  • We do not support version control to have some kind of history (git is missing)
  • What about if we need to cover the UAT or PROD environment?

If we are looking for an enterprise, this is far away. The clients are ready to pay even more to get the best solution in the market and be ready to make it worth it or our projects are ongoing and we can’t cover WP there.

My opinion is that you can cover small or medium apps and for projects like portfolios, polls, promotions, magazines, small e-commerce, funding/donations, or only manage some content on the site with editable HTML (about us, contact, blog-post, articles). Even some shared content with a mobile app and the web page can be here and It’s totally fine.

Everything depends but it’s on you how you will organize the project or decide to go with an easy-misy setup. I hope that you find something useful and if you have any questions feel free to contact me.

Best,
Andrej