Why You Should Use WordPress to Build Custom Web Apps

Why You Should Use WordPress to Build Custom Web Apps

You can develop a web app using WordPress in mere days, and for way less money than investing in custom development. WordPress isn’t suitable for every kind of app, but it’s more than a simple CMS for blogs.

Once you can transcend the publishing frame of mind, you’ll see how you have some robust infrastructure to use as a jumping off point.

There’s a lot more under the hood than you think. In fact, if you’re skeptical, come with me as we take a closer look. You’re going to be pleasantly surprised by how many underutilized components exist that you can use to build on.

Continue reading, or jump ahead using these links:

When to Use WordPress for Your Custom Web Apps

If you plan to create a highly customized business application with sensitive data, then WordPress isn’t going to be the best framework. WordPress is an ideal solution if:

  1. Your app needs to be updated by a non-technical user
  2. Your app needs an easy-to-navigate back end
  3. You need to come up with a proof of concept
  4. You need to build a simple-to-moderately complex app fast

WordPress plus a managed host can provide a general framework, and you can expand on this framework with plugins. You can configure the foundation of your app within just a few hours.

Screenshot of Plugins on WordPress.org
There’s a plugin for that

You won’t have to come up with database architecture, security, APIs, or user management, WordPress has all that! And managed hosting takes care of staging, backups, version control and performance optimization.

The Non-Developers Guide to Git and GitHub

Basically, you don’t need to reinvent the wheel. You can use the solutions others have already thought up, allowing you to get started like today, cutting down on costs dramatically. WordPress excels when it comes to giving you the tools you need to ship quickly and therefore affordably.

Yes, You can really use WordPress to Build Apps

Customize Everything

A blog is the default app that comes preconfigured with WordPress. You have your posts, tags, categories, etc. But what you really have is data that is neatly structured. You can use tags, categories or create your own custom taxonomies to associate data with one another. He-llo relational database!

eCommerce is another popular app to build using WordPress. With WooCommerce, you get additional components, such as a shopping cart; but the products build on the existing data structure with products, tags, categories and attributes.

There’s two things at work here:

  1. Custom post types
  2. Custom fields
Screenshot of WordPress admin with lists, links, reviews, posts and other custom post types
Look at all these custom post types keeping everything organized

Both custom post types and custom fields can be used to structure a lot of different kinds of data:

  • events
  • directory listings
  • contacts
  • reviews
  • leads
  • recipes
  • classes

You can use Advanced Custom Fields to create fields and meta boxes for your custom post types. It’s a framework plugin, so it’s endlessly adaptable. You can use it for advanced database management and to organize the fields on the WordPress backend for neater user interfaces.

Create a Custom Search With Toolset That Helps Customers Find Exactly What They Want

Retrieving Data from the Database

As a database driven application, WordPress uses MySQL or MariaDB to store all your newly created data types.

When it comes to retrieving this data, you have several highly customizable options:

  1. WP_Query
  2. Custom SQL Queries
  3. WordPress REST API

Although WP_Query is the standard way to retrieve posts and pages, you can also use it to retrieve custom post types. WP_Query allows you to filter by tags, categories, custom fields, published date, status, author and more. Take a look at all the existing WP_Query arguments.

WP_Query uses the SELECT SQL command. If you need to use JOIN or use data from your own custom table, then you can create custom SQL queries instead of using WP_Query. That’s when the possibilities really start to unfold. You can select exactly the data you need to display.

Not only can you use the WordPress REST API to retrieve data, you can customize it to include custom post types and custom fields. You can then display the data within WordPress or on another site entirely.

The REST API (and How It Could Change WordPress Forever)

The WordPress Rest API

I’d argue that the WordPress REST API has a lot of untapped potentials when it comes to creating custom CRUD applications with WordPress.

But when developing an app on WordPress, you’ll find a lot to be desired when it comes to themes. WordPress themes were designed to be used to display content and usually rely on server-side processing with PHP.

As WordPress has evolved to utilize newer technology, this has started to change. Remember back in 2015 when Matt Mullenweg suggested that WordPress pros should learn JavaScript deeply? Now we know why. Gutenberg is put together with React, which is a JavaScript library.

The WordPress API is a JSON API, so it was designed to not only work well with Javascript, but other languages such as Ruby, Python, etc. You can not only display data but create, read, update and delete it using the API.

With the WordPress REST API, you’re no longer limited to PHP to create themes in WordPress. You can use modern JavaScript frameworks.

Screenshot of WordPress functions file code with Woocommerce functions
Modifying themes using PHP isn’t your only option

WordPress vs MVC Framework

WordPress has developed a reputation as a tool for non-technical people to get started building their own website or blog, since it has a low barrier to entry. This has kept “serious” developers from considering WordPress as a viable app framework because it doesn’t fit the popular MVC paradigm. But MVC isn’t the only way to build an app.

You can build an app in WordPress, not by hacking together something odd, but by using the practical WordPress tools as they are.

  • For example, WordPress has a built-in user management system complete with 5 different levels of access. You don’t have to be the developer that writes a user management system for the umpteenth time. Authentication is also included so you have a way to manage sessions.
  • WordPress also has a community of people who are keeping an eye on security vulnerabilities. You don’t have to perform your own security audits and patch vulnerabilities.
  • WordPress can also send transactional emails for your app, although you’ll have to use SMTP if you’re sending out a large volume of emails. But even this is simple with a plugin.
  • WordPress permalinks allow you to modify how URLs are generated. And you can rewrite rules to build a URL structure that can assemble database queries.

How to Use Gmail to Send WordPress Emails

One of the places where the WordPress community has really brought forth some amazing tools is with forms. These aren’t just input boxes. WordPress forms are almost little apps unto themselves, capable of performing calculations, sending notifications and manipulating data.

Form plugins can give the front end of your app the input functionality to update your database. Some form plugins, such as Forminator, even have their own API.

How To Build Custom Forminator Add-ons Using The Developer API

By using the WordPress solutions to common needs, you can open up your time and resources to innovate at the edges instead.

Wrapping Up

There are a wealth of underutilized components in WordPress, either because they’re misunderstood or underestimated that can get the job done.

When building apps, you need to remember that your goal is to solve a problem. You can build an expensive Rube Goldberg machine that over-complicates and exacerbate a simple problem. Sure it is exciting to use cutting edge tools, but is it necessary?

It’s like using a jack hammer instead of a hammer. Sometimes a simpler framework, like WordPress will get the job done.

I find devs who strongly oppose using WordPress for apps misunderstand how WordPress actually works or assume WordPress is way too simple.

Going back to our hammer analogy, they assume WordPress is a rock. And while rocks would work as a hammer if nothing else is available, well, we’re not exactly living among the dinosaurs.

I think that WordPress is actually more like a power drill. Advanced and with enough power to handle big jobs, but you can’t use it like a hammer. You have to appreciate it for what it is and use it in the way it was designed. Then you’ll come to see that it’s actually more powerful than you expected.

And speaking of tools…if you want to undertake the process of building a WordPress app, WPMU DEV is the swiss army knife of WordPress tools. With our new managed hosting, plus our performance and security tools, you’ll have everything you need to build an incredible app. Take advantage of our  free trial and experience everything we offer risk-free.

True story, I once built a CRM for 50 people using WordPress and a company intranet. Have you built anything with WordPress besides a blog or store? What was the experience like for you?
Felicia Ceballos-Marroquin
Felicia Ceballos-Marroquin WPMU DEV rescued Felicia from cubicle hell and put her decade of WordPress expertise to good use, giving her the privilege of being a staff writer.