John Swimmer Recommendations

PoP can finally be installed!

Alright, that took some time in coming, but we can finally announce it: PoP can finally be installed through Composer! Sucess!!!!!

So for first time in its history, PoP can be easily installed, without resorting to hacks: simply execute a script, wait for a few minutes, and voilĂ . Currently, only the PoP API for WordPress is finished, and in a few months we will unlock further functionality: creating the whole site through PoP, and for other CMSs in addition to WordPress. Yay!

Installation instructions

Via Composer and WP-CLI (both are assumed to be installed globally):

  1. Create the WordPress database and user
  2. Configure WordPress through environment variables:

Copy the code below to an editor, replace all values (such as {YOUR_SITE_DB_NAME}) with your own values, and then either paste it on the terminal to execute, or save it in file “~/.bash_profile” and then execute source ~/.bash_profile.

export DB_NAME={YOUR_SITE_DB_NAME} #eg: database
export DB_USER={YOUR_SITE_DB_USER} #eg: admin
export DB_PASSWORD={YOUR_SITE_DB_PASSWORD} #eg: sADF!kl9diq@#Sjfk
export SITE_URL_WITH_HTTP={YOUR_SITE_URL_WITH_HTTP} #eg: http://localhost
export SITE_NAME="{YOUR_SITE_NAME}" #eg: "My awesome website"
export ADMIN_USER={ADMIN_USER} #eg: admin

To set the SALT keys there are two alternatives:

I. Set random values through environment variable SHUFFLE_SALT_KEYS:


II. Set the corresponding values directly:

# Obtain random values from
  1. Bootstrap a new project from this repo:
composer create-project leoloso/pop-api-wp
  1. Wait for a few minutes ☕️😁
  2. ✅ The site is installed under:
    • 👉WordPress site: {YOUR_SITE_URL_WITH_HTTP}
    • 👉WordPress admin: {YOUR_SITE_URL_WITH_HTTP}/wp/wp-admin/
    • 👉PoP API: {YOUR_SITE_URL_WITH_HTTP}/posts/?action=api&datastructure=rest (REST for posts)



The PoP API now supports both REST and GraphQL!

We are very proud to announce that PoP can now return the response of its API using both the REST and GraphQL formats. This way, a PoP API can be used as a drop-in replacement for both REST and GraphQL, providing the benefits of both these APIs, at the same time! Check out these benefits:

  • No over/under-fetching data (as in GraphQL)
  • Shape of the response mirrors mirrors the query (as in GraphQL)
  • Passing parameters to the query nodes, at any depth, for filtering/pagination/formatting/etc (as in GraphQL)
  • Server-side caching (as in REST)
  • Secure: Not chance of Denial of Service attacks (as in REST)
  • Provide default data when no query is provided (as in REST)

In a nutshell: the PoP API is REST endpoints with GraphQL queries.


The API is accessed through the following endpoints (click on them to see an example):


Add parameters action=api&datastructure=rest to the endpoint URL:


Add parameters action=api&datastructure=graphql to the endpoint URL, and parameter fields with the data fields to retrieve (using a custom dot notation). Examples:

PoP native:

Add parameters action=api to the endpoint URL, and parameter fields similar to the examples above for GraphQL.

How does it work?

Through a parameter datastructure in the URL we can select if the response must be REST-compatible or GraphQL-compatible. To fetch the data fields, for REST it supports default fields (as in typical REST behaviour), or explicitly querying for the fields, like in GraphQL. For this, the GraphQL query is converted to dot notation and passed in the URL through parameter fields. For instance, the following query:

query {
  comments {
    author {
      posts {

Is converted to dot notation like this:



PoP now automatically generates the GraphQL-like query to fetch data from an external site

When fetching data for a component, PoP allows to point to an external domain. Until now, the external site had to have the same components installed as the origin site, to guarantee that the response would be what was expected by the origin site. Undoubtedly, this was less than ideal.

This is solved now, and very elegantly: whenever a component fetches data from an external site, it automatically generates the URL to query, including all the fields that need be retrieved. Similar to GraphQL, this request will fetch only the required data, and because it is automatically generated by the application, there are no possibilities of manual errors from creating the query, and if any field is updated or a new one introduced or removed, the query is automatically upgraded too. The automatically generated query looks like this (assuming, in this case, that is the external site).

Through this feature, PoP sites will be able to share data effortlessly. The developer will not even need to code a query to fetch data, but simply arranging all modules inside each other will do. PoP takes care of the rest.

As usual, enjoy!

PoP now complies with PSR-1 and PSR-2

PoP is now compliant with PHP Standards Recommendations PSR-1: Basic Coding Standard and PSR-2: Coding Style Guide. This involved a huge refactoring of the whole codebase, renaming all functions from their snake case form (such as get_modules) into their camel case equivalent (getModules). As usual, enjoy!

The new PoP API can now be installed!

We have started releasing the new PoP. This is the first time ever that PoP can be installed without fear of it breaking up: originally the codebase was not split into plugins, so if certain plugins were not activated, everything broke, greatly impairing the chance of developers being able to use it (for which the project barely has 50+ stars on GitHub). After 10 months of heavy work and tears, it started being ready. Hurray!

To download the new PoP API, simply head to the repository on GitHub and follow the instructions.

The overall migration is not finished though: only the API layer is ready, the rendering layers (for both client-side and server-side) are still under development, so they will be released in stages as soon as they are finished. We expect everything to be up by 2nd quarter 2019.

This is a major release: The new PoP API is fully based on components (we believe this is a primer among APIs, we’ve never seen or heard of one before), and will be able to offer unique capabilities, making it extremely easy to build any kind of website, from simple sites to decentralized social networks.

We will keep blogging about the new capabilities alongside each new release. Enjoy!


Sign up to our newsletter:

Welcome to the PoP framework!
Break the information monopoly

the PoP framework is open source software which aims to decentralize the content flow and break the information monopoly from large internet corporations. Read more.