Like elasticsearch? We do too!

Elasticsearch tools

Elasticsearch, if you’re not familiar with it, is defined as a distributed restful search and analytics tool.

When it comes to implementing such an infrastructure, our developers not only face the challenges involved in indexing tens of millions of sites with grace and skill, they also write quite extensively about their related adventures, so others can benefit from their experiences.

You can find a plethora of posts on Greg Brown’s blog, under the appropriate tag. Subjects ranging from performance and scaling, all the way to “Elasticsearch, Open Source, and the Future“. And in true Automattician fashion, he isn’t even shy about recognizing his mistakes.

But Greg is not alone! Xiao Yu also recently wrote about the tools he uses, and a plugin he concocted for his own needs:

I’ve taken all that I wished I could do with both of those plugins and created a new Elasticsearch plugin that I call Whatson. This plugin utilizes the power of D3.js to visualize the nodes, indices, and shards within a cluster. It also allows the drilling down to segment data per index or shard. With the focus on visualizing large clusters and highlighting potential problems within. I hope this plugin helps others find and diagnose issues so give it a try.

How’s that for advanced? :)

Embed WordPress.com or Jetpack blogs on other websites with timelines

Today we are making it easier for you to bring your other websites closer to your WordPress.com or Jetpack blogs.

The new embedded timeline tool allows you to put a timeline of your blog posts on your website, connecting your visitors with the content you are writing here.

It only takes two pieces of HTML to embed a view of your blog directly on your website. The embed is interactive and allows your readers to follow your blog or like your posts without leaving the page. Both WordPress.com and Jetpack blogs are supported.

Our embedded timelines documentation contains directions on how to implement the timeline on your own site.

We also have a tool that allows you to create timelines without any coding at our creation page.

PS: The timelines are built using the REST API – take a look and start building your own app today!

You can also use a shortcode to Embed the timeline on a WordPress.com blog:
[wptimeline url="http://developer.wordpress.com" showgravatars="true"]

Here is an example of a timeline in action:

Recent Posts on http://developer.wordpress.com

Platform Updates: Batching Calls, Privacy Settings, and IDs

We’ve made a few more updates to our APIs recently that we wanted to share with you.

The biggest update is a new query parameter that’s now available on all endpoints. The new parameter allows you to batch certain calls together, so you only need to make one request to get related data instead of two or three.

Since we released our APIs, we’d always return a list of related endpoints in the “meta” response with a series of links:

"meta": {
        "links": {
            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238",
            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238\/help",
            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907",
            "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238\/replies\/",
            "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238\/likes\/"
},

Now, by passing ?meta=site, you can automatically get the data from the above endpoints in the original response. Let’s take a look at an example.

Say you’re loading a specific post but you want to know the name and description of the site the post was on. You can do this by making a call to: https://public-api.wordpress.com/rest/v1/sites/en.blog.wordpress.com/posts/21238/?meta=site.

Which will give you a response like the following:

"meta": {
        "links": {
            "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238",
            "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238\/help",
            "site": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907",
            "replies": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238\/replies\/",
            "likes": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/21238\/likes\/"
        },
        "data": {
            "site": {
                "ID": 3584907,
                "name": "WordPress.com News",
                "description": "The latest news on WordPress.com and the WordPress community.",
                "URL": "http:\/\/en.blog.wordpress.com",
                "jetpack": false,
                "subscribers_count": 8396934,
                "meta": {
                    "links": {
                        "self": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907",
                        "help": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/help",
                        "posts": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/posts\/",
                        "comments": "https:\/\/public-api.wordpress.com\/rest\/v1\/sites\/3584907\/comments\/"
                    }
                },
                "is_private": false
            }
}

You can also pass multiple values in the meta query string. If you wanted the site endpoint and a list of likes for a post you can just pass "site,likes".

Two other updates we made are new responses:

  • We now include the value of privacy setting in the site information endpoint. A boolean value will be included as is_private.
  • We now include a global_ID response for all posts. This is a unique ID that you can use to identify posts if you are loading posts from multiple blogs in your application.

We hope you enjoy these updates. We’ll be making more improvements soon!

Developer Plugin 1.2.2 Released: New WP-CLI Command

Version 1.2.2 of the Developer plugin was recently released. The big feature of this release is a new WP-CLI command. If you’re not familiar with WP-CLI, it is “a set of command-line tools for managing WordPress installations.” These command-line tools let you do anything from download and install WordPress to manage options for your site. The command we’ve introduced will let you install and, optionally, activate the recommended plugins.

For example, the following will install and activate the Developer plugin and all the recommended plugins for WordPress.com VIP.

wp plugin install developer --activate
wp developer install-plugins --type=wpcom-vip --activate

As always, pull requests are welcome on Github. If you want to introduce a new WP-CLI subcommand or just stay up to date with the latest on the Developer plugin, join us there.

Developer plugin 1.2 released: UI Improvements and New Plugins

Version 1.2 of the Developer plugin is hot off the press!

1.2 includes a host of UI improvements as well as two new plugins, Log Viewer by Markus Fischbacher, and Jetpack by Automattic, plus a new Jetpack constant,  JETPACK_DEV_DEBUG. This release aims to improve the usability of Developer by adding:

  • Detailed messages in case of an error while installing or activating a plugin
  • Plugin descriptions on installation steps, so it’s more clear what you’re installing actually does
  • A link to the plugin details page on installation steps
  • A more obvious button to close the post-install modal window

Also included are some behind the scenes improvements to make recommended plugins and constants more flexible down the road as we continue to add to the plugin.

If you’d like to stay up to date with the latest on Developer, please join us on Github where all feedback, plugin suggestions, bug reports, and pull requests are always welcome!