![Image](https://storage.googleapis.com/stateless-torbjorn-zetterlund/sites/8/2015/06/IMG_20150628_164357.jpg)
Using WordPress instead of Parse.com
by bernt & torsten
If you have not heard it yet, Parse announced they’re shutting down their backend as a service. If you’ve built a mobile app with Parse as your backend, you need to migrate to another backend platform or set up your own parse server, as Parse is open-sourcing the parse server.
The good news is that they’re giving developers 12 months to find a new solution, and they’re providing a path to running your own Parse-compatible service. There’s a great migration guide that covers exporting Parse data to MongoDB and running a Parse server built on Node.js and express.
WordPress instead of Parse.com
I have taken a different route, instead of setting up my own parse server, I have taken the route of using WordPress as my backend. My Android app is very simple, it’s a recipe guide for cyclists.
![Screenshot_20160624-163637](https://i0.wp.com/torbjornzetterlund.com/wp-content/uploads/2016/06/Screenshot_20160624-163637.png?resize=574%2C1020&ssl=1)
The app is very simple, in that it shows the recipes and you can select recipes by category. My database model requires a recipe table and a category table.
WordPress Plugins to use
To be able to emulate exactly the same data model as on the parse.com service, I needed to take the help of some specific plugins to be able to create the same database model as on the parse.com database.
- Advanced Custom Fields (ACF) – Add Custom Fields
- Custom Post Types UI – Register custom post and category types
- WP REST API V2 – The WordPress Rest API
- WP Custom Category Images – Adding images to category
- WP API V2 Recipe Category Images – Registering category image with WP API V2
What did I do
I configured the Custom Post Types UI creating a new Post Type
![Add_Edit_Post_Types](https://i0.wp.com/torbjornzetterlund.com/wp-content/uploads/2016/06/Add_Edit_Post_Types.png?resize=1362%2C492&ssl=1)
When configuring I made sure that I set the REST API to true.
I then created a custom category that is linked with the Custom Post Type.
![Add_Edit_Taxonomies](https://i0.wp.com/torbjornzetterlund.com/wp-content/uploads/2016/06/Add_Edit_Taxonomies.png?resize=1048%2C372&ssl=1)
Make sure your REST API is set to true.
![Edit_Field_Group](https://i0.wp.com/torbjornzetterlund.com/wp-content/uploads/2016/06/Edit_Field_Group.png?resize=867%2C436&ssl=1)
Next, I created my Custom Fields with Advanced Custom Fields (ACF) –
I made sure that the post type for my custom fields is set to recipes.
Adding Recipes
Now after I set up the ACF and CP UI – I can start adding my categories,
![Recipe_Categories](https://i0.wp.com/torbjornzetterlund.com/wp-content/uploads/2016/06/Recipe_Categories.png?resize=1186%2C481&ssl=1)
I wrote the plugin WP Custom Category Images to add an image for each category. After I set up my categories, I entered my recipes:
![Recipes](https://i0.wp.com/torbjornzetterlund.com/wp-content/uploads/2016/06/Recipes.png?resize=1343%2C539&ssl=1)
When all was done, now I can start using my mobile app to show the content in my mobile app. To do that I needed to enable WP REST API V2 and to register my custom recipe images with the WP REST API V2, I did that by creating a plugin WP API V2 Recipe Category Images which with a few lines of code register the IP. I could have used a plugin like Code Snippets to enter the code, I went with a plugin.
Testing
I use chrome, so for testing, I’m using the chrome addon Advanced REST client – you can also test in the browser.
My Recipe API call – https://<url>/wp-json/wp/v2/recipes/
My Recipe Category API Call – https://<url>/wp-json/wp/v2/recipe_categories/
If you have any questions you can contact me or you can use the comment fields below.
![Image](https://storage.googleapis.com/stateless-torbjorn-zetterlund/sites/8/2024/06/20240604-102648.png)
The AI boom – a ticking energy bomb
Yes, the rise of artificial intelligence indeed presents a conundrum, not unlike the many...
![Image](https://storage.googleapis.com/stateless-torbjorn-zetterlund/sites/8/2023/11/totta7219_this_is_about_In_the_realm_of_creative_endeavour.png)
Three Ideas To Keep Your Construction Business Running Smoothly
If your construction business is currently struggling, then you need to work out how to get...
![Image](https://storage.googleapis.com/stateless-torbjorn-zetterlund/sites/8/2024/01/20240116-085856.png)
Business vs. GPTs: Navigating the Challenges of Personalized AI
The recent proclamation by OpenAI has caught the attention of $20 ChatGPT Plus subscribers,...