All Collections
FAQs
Does Shifter support the WP REST API?
Does Shifter support the WP REST API?

Details regarding the WordPress REST API usage on Shifter

Tomohyco Tsunoda avatar
Written by Tomohyco Tsunoda
Updated over a week ago

WordPress REST API Explained

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

Does Shifter support the WP REST API?

The answer is yes and no. Shifter has two disturbing 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.

Where the file is stored?

The db.json is created once it activated. The stored directory is moved to /wp-content/wp-sls-api/db.json from /wp-content/uploads/wp-sls-api/db.json since version 0.2.0.

No more conflicts with Shifter Media CDN.

For more info check out the project on Github here.

Did this answer your question?