Does Shifter support the WP REST API?

WordPress REST API Explained

The WP REST API is a programmable interface used to interact with WordPress and it’s data.

Does Shifter support the WP REST API?

The answer is yes and no. Shifter has two distring environments and it’s important to note which supports the WP REST API.

  1. Using the WP REST API in Shifter’s container environment is supported.
  2. Using the WP REST API in production is not.

The reason the WP REST API is not available in production is that WordPress is not running. Shifter converts WordPress to a static site and once that happens PHP and the necessary software to interact with the API is no longer there.

What other options are there?

We’ve created a WordPress Plugin the WP Serverless API and it’s designed as a read only WP REST API.

It works by querying the REST API and saving that output as a static.

For more info check out the project on Github here.

Related Posts