Support » Installation » HTTPS Tester – Fehlermeldung (Plugin Updates werden nicht angezeigt)

  • Hallo zusammen,

    Wir stoßen hier auf ein sehr merkwürdiges Problem wo wir anstehen.

    Und zwar werden uns keinerlei Plugin Updates mehr im WordPress Backend angezeigt. Im Gegensatz hierzu, wird jedoch das WP 4.7 Update sehr wohl ersichtlich.

    Wir haben nun das Plugin HTTPS Tester installiert und erhalten folgende Fehlermeldungen:

    Since WordPress 3.7, all communication to WordPress.org is attempted over HTTPS, this is to improve security and make it harder for someone to perform a MITM attack against a WordPress site.
    
    Unfortunately, there have been reports that some hosts configurations are not allowing it to work, this plugin is used to debug it and find out what's going on.
    
        [PASS]: Your WordPress install claims to support HTTPS Connections
        [PASS]: Checking that the HTTPS Root Certificate bundle exists and is accessible
        [PASS]: cURL is installed and supports SSL communication, cURL Details: version_number=467712; age=3; features=50877; ssl_version_number=0; version=7.35.0; host=x86_64-pc-linux-gnu; ssl_version=OpenSSL/1.0.1f; libz_version=1.2.8; protocols=dict,file,ftp,ftps,gopher,http,https,imap,imaps,ldap,ldaps,pop3,pop3s,rtmp,rtsp,smtp,smtps,telnet,tftp
        [PASS]: OpenSSL is installed. OpenSSL 1.0.1f 6 Jan 2014 268439663
        [PASS]: Checking if stream_socket_client exists
        [PASS]: Checking if openssl_x509_parse exists
        [PASS]: Verifying api.wordpress.org resolves correctly. 66.155.40.187
        [WARNING]: [Streams] Communication with WordPress.org suceeded after 1.535 seconds, but an unexpected response was received: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="http://gmpg.org/xfn/11"> <meta charset="utf-8" /> <!-- <meta property="fb:page_id" content="6427302910" /> --> <meta name="google-site-verification" content="7VWES_-rcHBcmaQis9mSYamPfNwE03f4vyTj4pfuAw0" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="noodp"> <title>REST API Handbook | WordPress Developer Resources</title> <meta name="referrer" content="always"> <link href="//s.w.org/wp-includes/css/dashicons.css?20160504" rel="stylesheet" type="text/css" /> <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="//s.w.org/style/wp4.css?53" /> <link media="only screen and (max-device-width: 480px)" href="//s.w.org/style/iphone.css?1" type="text/css" rel="stylesheet" /> <link rel="shortcut icon" href="//s.w.org/favicon.ico?2" type="image/x-icon" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-52447-1']); _gaq.push(['_setDomainName', 'wordpress.org']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function recordOutboundLink(link, category, action) { _gaq.push(['_trackEvent', category, action]) setTimeout('document.location = "' + link.href + '"', 100); } </script> <!--[if lte IE 8]> <style type="text/css"> @import url("//s.w.org/style/ie.css?1"); </style> <![endif]--> <link rel="pingback" href="https://developer.wordpress.org/xmlrpc.php" /><link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Feed" href="https://developer.wordpress.org/feed/" /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Comments Feed" href="https://developer.wordpress.org/comments/feed/" /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/developer.wordpress.org\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.8-alpha-39600"}}; !function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),!(j.toDataURL().length<3e3)&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,65039,8205,55356,57096),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,55356,57096),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55357,56425,55356,57341,8205,55357,56507),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55357,56425,55356,57341,55357,56507),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='dashicons-css' href='https://developer.wordpress.org/wp-includes/css/dashicons.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='https://developer.wordpress.org/wp-includes/css/admin-bar.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-handbook-css-css' href='https://developer.wordpress.org/wp-content/plugins/handbook/stylesheets/callout-boxes.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-developer-style-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/style.css?ver=2' type='text/css' media='all' /> <link rel='stylesheet' id='wp-dev-sass-compiled-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/main.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='awesomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/awesomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='autocomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/autocomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-core-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?ver=3.0.9b' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-theme-default-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?ver=3.0.9b' type='text/css' media='all' /> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/handbook/scripts/handbook.js?ver=20150930'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?ver=3.0.9b'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPhp.js?ver=3.0.9b'></script> <link rel='https://api.w.org/' href='https://developer.wordpress.org/wp-json/' /> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://developer.wordpress.org/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://developer.wordpress.org/wp-includes/wlwmanifest.xml" /> <link rel='next' title='Authentication' href='https://developer.wordpress.org/rest-api/authentication/' /> <meta name="generator" content="WordPress 4.8-alpha-39600" /> <link rel="canonical" href="https://developer.wordpress.org/rest-api/" /> <link rel='shortlink' href='https://developer.wordpress.org/?p=22832' /> <link rel="alternate" type="application/json+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F" /> <link rel="alternate" type="text/xml+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F&format=xml" /> <script type="text/javascript"> jQuery( '<style>.hide-if-js { display: none; }</style>' ).appendTo( 'head' ); jQuery( function($) { $( 'body' ).addClass('js'); } ); </script> <style type="text/css" media="print">#wpadminbar { display:none; }</style> <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } } </style> <style type="text/css" id="syntaxhighlighteranchor"></style> <script>document.cookie='devicePixelRatio='+((window.devicePixelRatio === undefined) ? 1 : window.devicePixelRatio)+'; path=/';</script> <script type="text/javascript"> var toggleMenu = function(){ var m = document.getElementById('wporg-header-menu'), c = m.className; m.className = c.match( ' active' ) ? c.replace( ' active', '' ) : c + ' active'; } </script> </head> <body id="wordpress-org" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support single-handbook"> <div id="wporg-header"> <div class="wrapper"> <a id="mobile-menu-button" class="" href="#" onclick="toggleMenu();"></a> <h1><a href="//wordpress.org">WordPress.org</a></h1> <div id="head-search"> <form action="//wordpress.org/search/do-search.php" method="get"> <label for="global-search" class="screen-reader-text">Search WordPress.org for:</label> <input id="global-search" class="text" name="search" type="text" value="" maxlength="150" placeholder="Search WordPress.org" /> <input type="submit" class="button" value="" /> </form> </div> <div style="clear:both"></div> <ul id="wporg-header-menu"> <li><a href='//wordpress.org/showcase/' title='See some of the sites built on WordPress.'>Showcase</a></li> <li><a href='//wordpress.org/themes/' title='Find just the right look for your website.'>Themes</a></li> <li><a href='//wordpress.org/plugins/' title='Plugins can extend WordPress to do almost anything you can imagine.'>Plugins</a></li> <li><a href='//wordpress.org/mobile/' title='Take your website on the go!'>Mobile</a></li> <li><a href='//wordpress.org/support/' title='Forums, documentation, help.'>Support</a><ul class="nav-submenu"><li><a href='//wordpress.org/support/' title='Support and discussion forums.'>Forums</a></li><li><a href='//codex.wordpress.org/Main_Page' title='Documentation, tutorials, best practices.'>Documentation</a></li></ul><div class="uparrow"></div></li> <li><a href='//make.wordpress.org/' title='Contribute your knowledge.'>Get Involved</a></li> <li><a href='//wordpress.org/about/' title='About the WordPress Organization, and where we're going.'>About</a></li> <li><a href='//wordpress.org/news/' title='Come here for the latest scoop.'>Blog</a></li> <li><a href='//wordpress.org/hosting/' title='Find a home for your blog.'>Hosting</a></li> <li id="download" class="button download-button"><a href='//wordpress.org/download/' title='Get it. Got it? Good.'>Download WordPress</a></li> </ul> <div style="clear:both"></div> </div> </div> <div id="page" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support hfeed site devhub-wrap single-handbook"> <a href="#main" class="screen-reader-text">Skip to content</a> <header id="masthead" class="site-header" role="banner"> <div class="inner-wrap"> <div class="site-branding"> <h1 class="site-title"> <a href="https://developer.wordpress.org/" rel="home">Developer Resources</a> </h1> </div> <div class="devhub-menu"> </div> </div><!-- .inner-wrap --> </header><!-- #masthead --> <div id="inner-search"> <div class="search-section section clear hide-if-js"> <form role="search" method="get" class="searchform searchform-handbook" action="https://developer.wordpress.org/rest-api/"> <div> <label> <label for="search-field" class="screen-reader-text">Search for:</label> <input type="text" id="search-field" class="search-field" placeholder="Search …" value="" name="s"> </label> <input type="submit" class="shiny-blue search-submit" value="Search"> </div> </form> </div><!-- /search-guide --> <div id="inner-search-icon-container"> <div id="inner-search-icon"> <div class="dashicons dashicons-search"><span class="screen-reader-text">Search</span></div> </div> </div> </div> <div id="content" class="site-content"> <div id="content-area" class="has-sidebar"> <div class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb"> <span class="trail-browse">Browse:</span> <span class="trail-begin"><a href="https://developer.wordpress.org" title="WordPress Developer Resources" rel="home">Home</a></span> <span class="sep">/</span> <span class="trail-inner"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></span> <span class="sep">/</span> <span class="trail-end">REST API Handbook</span> </div> <main id="main" class="site-main post-22832 rest-api-handbook type-rest-api-handbook status-publish hentry type-handbook" role="main"> <h1>REST API Handbook</h1> <style> .toc-jump { text-align: right; font-size: 12px; } .page .toc-heading { margin-top: -50px; padding-top: 50px !important; }</style><div class="table-of-contents"><h2>Topics</h2><ul class="items"><li><a href="#why-use-the-wordpress-rest-api">Why use the WordPress REST API</a></li> <li><a href="#key-concepts">Key Concepts</a> <ul> <li><a href="#routes-endpoints">Routes & Endpoints</a></li> <li><a href="#requests">Requests</a></li> <li><a href="#responses">Responses</a></li> <li><a href="#schema">Schema</a></li> <li><a href="#controller-classes">Controller Classes</a> </ul></li> <li><a href="#next-steps">Next Steps</a></ul> </div> <p>The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving <a href="https://en.wikipedia.org/wiki/JSON">JSON</a> (JavaScript Object Notation) objects. JSON is an open standard data format that is lightweight and human-readable, and looks like Objects do in JavaScript; hence the name. When you send content to or make a request to the API, the response will be returned in JSON. This enables developers to create, read and update WordPress content from client-side JavaScript or from external applications, even those written in languages beyond PHP.</p> <div class='callout callout-info'><p><span class="screen-reader-text">Note:</span> Looking for a list of the other APIs available within WordPress? You can find the <a href="https://codex.wordpress.org/WordPress_APIs">documentation here</a>.</p> </div> <h2 class="toc-heading" id="why-use-the-wordpress-rest-api" tabindex="-1">Why use the WordPress REST API <a href="#why-use-the-wordpress-rest-api" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Why use the WordPress REST API</span></a></h2> <p>The WordPress REST API makes it easier than ever to use WordPress in new and exciting ways, such as creating Single Page Applications on top of WordPress. You could create a plugin to provide an entirely new admin experiences for WordPress, or create a brand new interactive front-end experience.</p> <p>You would not even have to write the applications in PHP: any programming language that can make HTTP requests and interpret JSON can interact with WordPress through the REST API, from Node.js to Java and beyond.</p> <p>The WordPress REST API can also serve as a strong replacement for the admin-ajax API in core. By using the REST API, you can more easily structure the way you want to get data into and out of WordPress. AJAX calls can be greatly simplified by using the REST API, enabling you to spend less time accessing the data you need and more time creating better user experiences.</p> <p>Our imagination is the only limit to what can be done with the WordPress REST API. The bottom line is, if you want an structured, extensible, and simple way to get data in and out of WordPress over HTTP, you probably want to use the REST API. For all of its simplicity the REST API can feel quite complex at first, and we will attempt to break it down into smaller components so that we can easily piece together the full puzzle.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="key-concepts" tabindex="-1">Key Concepts <a href="#key-concepts" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Key Concepts</span></a></h2> <p>To get started with using the WordPress REST API we will break down some of the key concepts and terms associated with the API:</p> <ul> <li>Routes/Endpoints</li> <li>Requests</li> <li>Responses</li> <li>Schema</li> <li>Controller Classes</li> </ul> <p>Each of these concepts play a crucial role in using and understanding the WordPress REST API. Let’s briefly break them down so that we can later explore each in greater depth.</p> <h3 class="toc-heading" id="routes-endpoints" tabindex="-1">Routes & Endpoints <a href="#routes-endpoints" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Routes & Endpoints</span></a></h3> <p>A route, in the context of the WordPress REST API, is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an “endpoint”. To clarify: If we make a <code>GET</code> request to <code>http://oursite.com/wp-json/</code>, we will get a JSON response showing us what routes are available, and within each route, what endpoints are available. <code>/wp-json/</code> is a route itself and when a <code>GET</code> request is made it matches to the endpoint that displays what is known as the index for the WordPress REST API. We will learn how to register our own routes and endpoints in the following sections.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="requests" tabindex="-1">Requests <a href="#requests" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Requests</span></a></h3> <p>One of the primary classes in the  WordPress REST API infrastructure is <code>WP_REST_Request</code>. This class is used to store and retrieve information for the current request; requests can be submitted remotely via HTTP but may also be made internally from PHP with WordPress. <code>WP_REST_Request</code> objects are automatically generated for you whenever you make an HTTP request to a registered route. The data specified in the request will determine what response you get back out of the API. There are a lot of neat things you can do using the request class. The request section will go into greater detail.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="responses" tabindex="-1">Responses <a href="#responses" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Responses</span></a></h3> <p>Responses are the data you get back from the API. The <code>WP_REST_Response</code> provides a way to interact with the response data returned by endpoints. Responses can return the desired data, and they can also be used to return errors.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="schema" tabindex="-1">Schema <a href="#schema" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Schema</span></a></h3> <p>Each endpoint requires and provides slightly different data structures, and those structures are defined in the API Schema. The schema structures API data and provides a comprehensive list of all of the properties the API can return and input parameters it can accept. Schema also provides security benefits for the API, as it enables us to validate the requests being made to the API. The Schema section further explores this large topic.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="controller-classes" tabindex="-1">Controller Classes <a href="#controller-classes" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Controller Classes</span></a></h3> <p>As you can see, the WordPress REST API has a lot of moving parts that all need to work together. Controller classes bring all of these elements together in a single place. With a controller class you can manage the registration of routes & endpoints, handle requests, utilize schema, and generate API responses.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="next-steps" tabindex="-1">Next Steps <a href="#next-steps" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Next Steps</span></a></h2> <p>Let’s look at the reference for the WordPress REST API.</p> <div class="bottom-of-entry"> </div> <nav class="handbook-navigation" role="navigation"> <h1 class="screen-reader-text">Handbook navigation</h1> <div class="nav-links"> <a href="https://developer.wordpress.org/rest-api/reference/" rel="next">Reference <span class="meta-nav">→</span></a> </div> <!-- .nav-links --> </nav><!-- .navigation --> </main><!-- #main --> <div id="sidebar" class="widget-area sidebar section" role="complementary"> <aside id="nav_menu-4" class="widget widget_nav_menu"><h1 class="widget-title">Chapters</h1><div class="menu-rest-api-table-of-contents-container"><ul id="menu-rest-api-table-of-contents" class="menu"><li id="menu-item-22855" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook current-menu-item menu-item-22855"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></li> <li id="menu-item-23109" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-has-children menu-item-23109"><a href="https://developer.wordpress.org/rest-api/reference/">Reference</a> <ul class="sub-menu"> <li id="menu-item-23136" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23136"><a href="https://developer.wordpress.org/rest-api/reference/posts/">Posts</a></li> <li id="menu-item-23139" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23139"><a href="https://developer.wordpress.org/rest-api/reference/post-revisions/">Post Revisions</a></li> <li id="menu-item-23132" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23132"><a href="https://developer.wordpress.org/rest-api/reference/categories/">Categories</a></li> <li id="menu-item-23142" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23142"><a href="https://developer.wordpress.org/rest-api/reference/tags/">Tags</a></li> <li id="menu-item-23135" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23135"><a href="https://developer.wordpress.org/rest-api/reference/pages/">Pages</a></li> <li id="menu-item-23137" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23137"><a href="https://developer.wordpress.org/rest-api/reference/comments/">Comments</a></li> <li id="menu-item-23147" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23147"><a href="https://developer.wordpress.org/rest-api/reference/taxonomies/">Taxonomies</a></li> <li id="menu-item-23134" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23134"><a href="https://developer.wordpress.org/rest-api/reference/media/">Media</a></li> <li id="menu-item-23130" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23130"><a href="https://developer.wordpress.org/rest-api/reference/users/">Users</a></li> <li id="menu-item-23133" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23133"><a href="https://developer.wordpress.org/rest-api/reference/post-types/">Post Types</a></li> <li id="menu-item-23138" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23138"><a href="https://developer.wordpress.org/rest-api/reference/post-statuses/">Post Statuses</a></li> <li id="menu-item-23131" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23131"><a href="https://developer.wordpress.org/rest-api/reference/settings/">Settings</a></li> </ul> </li> <li id="menu-item-23174" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23174"><a href="https://developer.wordpress.org/rest-api/global-parameters/">Global Parameters</a></li> <li id="menu-item-23182" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23182"><a href="https://developer.wordpress.org/rest-api/linking-and-embedding/">Linking and Embedding</a></li> <li id="menu-item-23087" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23087"><a href="https://developer.wordpress.org/rest-api/discovery/">Discovery</a></li> <li id="menu-item-22864" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22864"><a href="https://developer.wordpress.org/rest-api/authentication/">Authentication</a></li> <li id="menu-item-23096" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23096"><a href="https://developer.wordpress.org/rest-api/adding-rest-api-support-for-custom-content-types/">Custom Content Types</a></li> <li id="menu-item-23084" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23084"><a href="https://developer.wordpress.org/rest-api/pagination/">Pagination</a></li> <li id="menu-item-22862" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22862"><a href="https://developer.wordpress.org/rest-api/routes-and-endpoints/">Routes and Endpoints</a></li> <li id="menu-item-22861" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22861"><a href="https://developer.wordpress.org/rest-api/controller-classes/">Controller Classes</a></li> <li id="menu-item-23187" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23187"><a href="https://developer.wordpress.org/rest-api/glossary/">Glossary</a></li> <li id="menu-item-22859" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22859"><a href="https://developer.wordpress.org/rest-api/schema/">Schema</a></li> </ul></div></aside> </div><!-- #secondary --> </div><!-- #primary --> </div><!-- #content --> </div><!-- #page --> <div id="wporg-footer"> <div class="wrapper"> <ul> <li><a href="//wordpress.org/about/" title="An introduction to the WordPress project">About</a></li> <li><a href="//wordpress.org/news/" title="News and Updates">Blog</a></li> <li><a href="//wordpress.org/hosting/" title="Recommended web hosting providers">Hosting</a></li> <li><a href="http://jobs.wordpress.net/" title="Find or post WordPress jobs">Jobs</a></li> </ul> <ul> <li><a href="//wordpress.org/support/" title="Forums, documentation, and other resources">Support</a></li> <li><a href="//developer.wordpress.org" title="Resources for WordPress developers">Developers</a></li> <li><a href="//make.wordpress.org/" title="Give back to WordPress through code, support, translation and more">Get Involved</a></li> <li><a href="//learn.wordpress.org/" title="Workshops and training materials">Learn</a></li> </ul> <ul> <li><a href="//wordpress.org/showcase/" title="Some of the best WordPress sites on the Web">Showcase</a></li> <li><a href="//wordpress.org/plugins/" title="Add extra functionality to WordPress">Plugins</a></li> <li><a href="//wordpress.org/themes/" title="Make your WordPress pretty">Themes</a></li> <li><a href="//wordpress.org/ideas/" title="Share your ideas for improving WordPress">Ideas</a></li> </ul> <ul> <li><a href="//central.wordcamp.org/" title="Find a WordPress event near you">WordCamp</a></li> <li><a href="//wordpress.tv/" title="Videos, tutorials, and WordCamp sessions">WordPress.TV</a></li> <li><a href="//buddypress.org/" title="A set of plugins to transform your WordPress into a social network">BuddyPress</a></li> <li><a href="//bbpress.org/" title="Fast, slick forums built on WordPress">bbPress</a></li> </ul> <ul> <li><a href="//wordpress.com/?ref=wporg-footer" title="Hassle-free WordPress hosting">WordPress.com</a></li> <li><a href="//ma.tt/" title="Co-founder of WordPress, an example of what WordPress can do">Matt</a></li> <li><a href="//wordpress.org/about/privacy/" title="WordPress.org Privacy Policy">Privacy</a></li> <li><a href="//wordpress.org/about/license/" title="WordPress is open source software">License / GPLv2</a></li> </ul> <ul> <li> <iframe title="Follow @WordPress on Twitter" allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=WordPress&show_count=false" style="width:135px; height:20px;"></iframe> </li> <li> <iframe title="Like WordPress on Facebook" src="//www.facebook.com/plugins/like.php?app_id=121415197926116&href=http%3A%2F%2Fwww.facebook.com%2Fwordpress&send=false&layout=button_count&width=135&show_faces=false&action=like&colorscheme=light&font=lucida+grande&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:135px; height:21px;" allowTransparency="true"></iframe> </li> <li> <script src="https://apis.google.com/js/platform.js" async defer></script> <div class="g-plusone" data-size="medium" data-href="https://plus.google.com/+WordPress"></div> </li> </ul> </div> <h6 class="aligncenter cip-image">Code is Poetry.</h6> </div> <script type="text/javascript"> var _qevents = _qevents || []; (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); </script> <script type="text/javascript">_qevents.push( { qacct:"p-18-mFEk4J448M"} );</script> <noscript><img src="//pixel.quantserve.com/pixel/p-18-mFEk4J448M.gif" style="display: none;" border="0" height="1" width="1" alt=""/></noscript> <!-- 12 queries. 0.189 seconds --> <script type="text/javascript" src="//gravatar.com/js/gprofiles.js"></script> <script type="text/javascript"> (function($){ $(document).ready(function() { $('#footer a').click(function() { if (this.href.indexOf('wordpress.org') == -1 && this.href.indexOf('http') == 0) { recordOutboundLink(this, 'Outbound Links', this.href); return false; } }); }); })(jQuery); </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/admin-bar.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/navigation.js?ver=20120206'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/skip-link-focus-fix.js?ver=20130115'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/search.js?ver=20150430'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/awesomplete.min.js?ver=20160322'></script> <script type='text/javascript'> /* <![CDATA[ */ var autocomplete = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"5dbde914f3"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/autocomplete.js?ver=20160524'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/function-reference.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var quicktagsL10n = {"closeAllOpenTags":"Close all open tags","closeTags":"close tags","enterURL":"Enter the URL","enterImageURL":"Enter the URL of the image","enterImageDescription":"Enter a description of the image","textdirection":"text direction","toggleTextdirection":"Toggle Editor Text Direction","dfw":"Distraction-free writing mode","strong":"Bold","strongClose":"Close bold tag","em":"Italic","emClose":"Close italic tag","link":"Insert link","blockquote":"Blockquote","blockquoteClose":"Close blockquote tag","del":"Deleted text (strikethrough)","delClose":"Close deleted text tag","ins":"Inserted text","insClose":"Close inserted text tag","image":"Insert image","ul":"Bulleted list","ulClose":"Close bulleted list tag","ol":"Numbered list","olClose":"Close numbered list tag","li":"List item","liClose":"Close list item tag","code":"Code","codeClose":"Close code tag","more":"Insert Read More tag"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/quicktags.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/comment-reply.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/tabs.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var wporg_note_preview = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"91d41d0100","preview":"preview note","preview_empty":"Nothing to preview","is_admin":""}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes-preview.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/wp-embed.min.js?ver=4.8-alpha-39600'></script> <div id="wpadminbar" class="nojq nojs"> <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1">Skip to toolbar</a> <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="Toolbar" tabindex="0"> <ul id="wp-admin-bar-root-default" class="ab-top-menu"> <li id="wp-admin-bar-wp-logo" class="menupop"><a class="ab-item" aria-haspopup="true" href="https://developer.wordpress.org/wp-admin/user/about.php"><span class="ab-icon"></span><span class="screen-reader-text">About WordPress</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-wp-logo-default" class="ab-submenu"> <li id="wp-admin-bar-about"><a class="ab-item" href="https://developer.wordpress.org/wp-admin/user/about.php">About WordPress</a> </li></ul><ul id="wp-admin-bar-wp-logo-external" class="ab-sub-secondary ab-submenu"> <li id="wp-admin-bar-wporg"><a class="ab-item" href="https://wordpress.org/">WordPress.org</a> </li> <li id="wp-admin-bar-documentation"><a class="ab-item" href="https://codex.wordpress.org/">Documentation</a> </li> <li id="wp-admin-bar-support-forums"><a class="ab-item" href="https://wordpress.org/support/">Support Forums</a> </li> <li id="wp-admin-bar-feedback"><a class="ab-item" href="https://wordpress.org/support/forum/requests-and-feedback">Feedback</a> </li></ul></div> </li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu"> <li id="wp-admin-bar-search" class="admin-bar-search"><div class="ab-item ab-empty-item" tabindex="-1"><form action="https://developer.wordpress.org/" method="get" id="adminbarsearch"><input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" /><label for="adminbar-search" class="screen-reader-text">Search</label><input type="submit" class="adminbar-button" value="Search"/></form></div> </li> <li id="wp-admin-bar-log-in"><a class="ab-item" href="https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2F">Log In</a> </li></ul> </div> </div> </body> </html>
        [WARNING]: [Streams with a POST body] Communication with WordPress.org suceeded after 1.535 seconds, but an unexpected response was received: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="http://gmpg.org/xfn/11"> <meta charset="utf-8" /> <!-- <meta property="fb:page_id" content="6427302910" /> --> <meta name="google-site-verification" content="7VWES_-rcHBcmaQis9mSYamPfNwE03f4vyTj4pfuAw0" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="noodp"> <title>REST API Handbook | WordPress Developer Resources</title> <meta name="referrer" content="always"> <link href="//s.w.org/wp-includes/css/dashicons.css?20160504" rel="stylesheet" type="text/css" /> <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="//s.w.org/style/wp4.css?53" /> <link media="only screen and (max-device-width: 480px)" href="//s.w.org/style/iphone.css?1" type="text/css" rel="stylesheet" /> <link rel="shortcut icon" href="//s.w.org/favicon.ico?2" type="image/x-icon" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-52447-1']); _gaq.push(['_setDomainName', 'wordpress.org']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function recordOutboundLink(link, category, action) { _gaq.push(['_trackEvent', category, action]) setTimeout('document.location = "' + link.href + '"', 100); } </script> <!--[if lte IE 8]> <style type="text/css"> @import url("//s.w.org/style/ie.css?1"); </style> <![endif]--> <link rel="pingback" href="https://developer.wordpress.org/xmlrpc.php" /><link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Feed" href="https://developer.wordpress.org/feed/" /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Comments Feed" href="https://developer.wordpress.org/comments/feed/" /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/developer.wordpress.org\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.8-alpha-39600"}}; !function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),!(j.toDataURL().length<3e3)&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,65039,8205,55356,57096),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,55356,57096),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55357,56425,55356,57341,8205,55357,56507),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55357,56425,55356,57341,55357,56507),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='dashicons-css' href='https://developer.wordpress.org/wp-includes/css/dashicons.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='https://developer.wordpress.org/wp-includes/css/admin-bar.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-handbook-css-css' href='https://developer.wordpress.org/wp-content/plugins/handbook/stylesheets/callout-boxes.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-developer-style-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/style.css?ver=2' type='text/css' media='all' /> <link rel='stylesheet' id='wp-dev-sass-compiled-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/main.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='awesomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/awesomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='autocomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/autocomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-core-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?ver=3.0.9b' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-theme-default-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?ver=3.0.9b' type='text/css' media='all' /> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/handbook/scripts/handbook.js?ver=20150930'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?ver=3.0.9b'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPhp.js?ver=3.0.9b'></script> <link rel='https://api.w.org/' href='https://developer.wordpress.org/wp-json/' /> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://developer.wordpress.org/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://developer.wordpress.org/wp-includes/wlwmanifest.xml" /> <link rel='next' title='Authentication' href='https://developer.wordpress.org/rest-api/authentication/' /> <meta name="generator" content="WordPress 4.8-alpha-39600" /> <link rel="canonical" href="https://developer.wordpress.org/rest-api/" /> <link rel='shortlink' href='https://developer.wordpress.org/?p=22832' /> <link rel="alternate" type="application/json+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F" /> <link rel="alternate" type="text/xml+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F&format=xml" /> <script type="text/javascript"> jQuery( '<style>.hide-if-js { display: none; }</style>' ).appendTo( 'head' ); jQuery( function($) { $( 'body' ).addClass('js'); } ); </script> <style type="text/css" media="print">#wpadminbar { display:none; }</style> <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } } </style> <style type="text/css" id="syntaxhighlighteranchor"></style> <script>document.cookie='devicePixelRatio='+((window.devicePixelRatio === undefined) ? 1 : window.devicePixelRatio)+'; path=/';</script> <script type="text/javascript"> var toggleMenu = function(){ var m = document.getElementById('wporg-header-menu'), c = m.className; m.className = c.match( ' active' ) ? c.replace( ' active', '' ) : c + ' active'; } </script> </head> <body id="wordpress-org" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support single-handbook"> <div id="wporg-header"> <div class="wrapper"> <a id="mobile-menu-button" class="" href="#" onclick="toggleMenu();"></a> <h1><a href="//wordpress.org">WordPress.org</a></h1> <div id="head-search"> <form action="//wordpress.org/search/do-search.php" method="get"> <label for="global-search" class="screen-reader-text">Search WordPress.org for:</label> <input id="global-search" class="text" name="search" type="text" value="" maxlength="150" placeholder="Search WordPress.org" /> <input type="submit" class="button" value="" /> </form> </div> <div style="clear:both"></div> <ul id="wporg-header-menu"> <li><a href='//wordpress.org/showcase/' title='See some of the sites built on WordPress.'>Showcase</a></li> <li><a href='//wordpress.org/themes/' title='Find just the right look for your website.'>Themes</a></li> <li><a href='//wordpress.org/plugins/' title='Plugins can extend WordPress to do almost anything you can imagine.'>Plugins</a></li> <li><a href='//wordpress.org/mobile/' title='Take your website on the go!'>Mobile</a></li> <li><a href='//wordpress.org/support/' title='Forums, documentation, help.'>Support</a><ul class="nav-submenu"><li><a href='//wordpress.org/support/' title='Support and discussion forums.'>Forums</a></li><li><a href='//codex.wordpress.org/Main_Page' title='Documentation, tutorials, best practices.'>Documentation</a></li></ul><div class="uparrow"></div></li> <li><a href='//make.wordpress.org/' title='Contribute your knowledge.'>Get Involved</a></li> <li><a href='//wordpress.org/about/' title='About the WordPress Organization, and where we're going.'>About</a></li> <li><a href='//wordpress.org/news/' title='Come here for the latest scoop.'>Blog</a></li> <li><a href='//wordpress.org/hosting/' title='Find a home for your blog.'>Hosting</a></li> <li id="download" class="button download-button"><a href='//wordpress.org/download/' title='Get it. Got it? Good.'>Download WordPress</a></li> </ul> <div style="clear:both"></div> </div> </div> <div id="page" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support hfeed site devhub-wrap single-handbook"> <a href="#main" class="screen-reader-text">Skip to content</a> <header id="masthead" class="site-header" role="banner"> <div class="inner-wrap"> <div class="site-branding"> <h1 class="site-title"> <a href="https://developer.wordpress.org/" rel="home">Developer Resources</a> </h1> </div> <div class="devhub-menu"> </div> </div><!-- .inner-wrap --> </header><!-- #masthead --> <div id="inner-search"> <div class="search-section section clear hide-if-js"> <form role="search" method="get" class="searchform searchform-handbook" action="https://developer.wordpress.org/rest-api/"> <div> <label> <label for="search-field" class="screen-reader-text">Search for:</label> <input type="text" id="search-field" class="search-field" placeholder="Search …" value="" name="s"> </label> <input type="submit" class="shiny-blue search-submit" value="Search"> </div> </form> </div><!-- /search-guide --> <div id="inner-search-icon-container"> <div id="inner-search-icon"> <div class="dashicons dashicons-search"><span class="screen-reader-text">Search</span></div> </div> </div> </div> <div id="content" class="site-content"> <div id="content-area" class="has-sidebar"> <div class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb"> <span class="trail-browse">Browse:</span> <span class="trail-begin"><a href="https://developer.wordpress.org" title="WordPress Developer Resources" rel="home">Home</a></span> <span class="sep">/</span> <span class="trail-inner"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></span> <span class="sep">/</span> <span class="trail-end">REST API Handbook</span> </div> <main id="main" class="site-main post-22832 rest-api-handbook type-rest-api-handbook status-publish hentry type-handbook" role="main"> <h1>REST API Handbook</h1> <style> .toc-jump { text-align: right; font-size: 12px; } .page .toc-heading { margin-top: -50px; padding-top: 50px !important; }</style><div class="table-of-contents"><h2>Topics</h2><ul class="items"><li><a href="#why-use-the-wordpress-rest-api">Why use the WordPress REST API</a></li> <li><a href="#key-concepts">Key Concepts</a> <ul> <li><a href="#routes-endpoints">Routes & Endpoints</a></li> <li><a href="#requests">Requests</a></li> <li><a href="#responses">Responses</a></li> <li><a href="#schema">Schema</a></li> <li><a href="#controller-classes">Controller Classes</a> </ul></li> <li><a href="#next-steps">Next Steps</a></ul> </div> <p>The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving <a href="https://en.wikipedia.org/wiki/JSON">JSON</a> (JavaScript Object Notation) objects. JSON is an open standard data format that is lightweight and human-readable, and looks like Objects do in JavaScript; hence the name. When you send content to or make a request to the API, the response will be returned in JSON. This enables developers to create, read and update WordPress content from client-side JavaScript or from external applications, even those written in languages beyond PHP.</p> <div class='callout callout-info'><p><span class="screen-reader-text">Note:</span> Looking for a list of the other APIs available within WordPress? You can find the <a href="https://codex.wordpress.org/WordPress_APIs">documentation here</a>.</p> </div> <h2 class="toc-heading" id="why-use-the-wordpress-rest-api" tabindex="-1">Why use the WordPress REST API <a href="#why-use-the-wordpress-rest-api" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Why use the WordPress REST API</span></a></h2> <p>The WordPress REST API makes it easier than ever to use WordPress in new and exciting ways, such as creating Single Page Applications on top of WordPress. You could create a plugin to provide an entirely new admin experiences for WordPress, or create a brand new interactive front-end experience.</p> <p>You would not even have to write the applications in PHP: any programming language that can make HTTP requests and interpret JSON can interact with WordPress through the REST API, from Node.js to Java and beyond.</p> <p>The WordPress REST API can also serve as a strong replacement for the admin-ajax API in core. By using the REST API, you can more easily structure the way you want to get data into and out of WordPress. AJAX calls can be greatly simplified by using the REST API, enabling you to spend less time accessing the data you need and more time creating better user experiences.</p> <p>Our imagination is the only limit to what can be done with the WordPress REST API. The bottom line is, if you want an structured, extensible, and simple way to get data in and out of WordPress over HTTP, you probably want to use the REST API. For all of its simplicity the REST API can feel quite complex at first, and we will attempt to break it down into smaller components so that we can easily piece together the full puzzle.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="key-concepts" tabindex="-1">Key Concepts <a href="#key-concepts" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Key Concepts</span></a></h2> <p>To get started with using the WordPress REST API we will break down some of the key concepts and terms associated with the API:</p> <ul> <li>Routes/Endpoints</li> <li>Requests</li> <li>Responses</li> <li>Schema</li> <li>Controller Classes</li> </ul> <p>Each of these concepts play a crucial role in using and understanding the WordPress REST API. Let’s briefly break them down so that we can later explore each in greater depth.</p> <h3 class="toc-heading" id="routes-endpoints" tabindex="-1">Routes & Endpoints <a href="#routes-endpoints" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Routes & Endpoints</span></a></h3> <p>A route, in the context of the WordPress REST API, is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an “endpoint”. To clarify: If we make a <code>GET</code> request to <code>http://oursite.com/wp-json/</code>, we will get a JSON response showing us what routes are available, and within each route, what endpoints are available. <code>/wp-json/</code> is a route itself and when a <code>GET</code> request is made it matches to the endpoint that displays what is known as the index for the WordPress REST API. We will learn how to register our own routes and endpoints in the following sections.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="requests" tabindex="-1">Requests <a href="#requests" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Requests</span></a></h3> <p>One of the primary classes in the  WordPress REST API infrastructure is <code>WP_REST_Request</code>. This class is used to store and retrieve information for the current request; requests can be submitted remotely via HTTP but may also be made internally from PHP with WordPress. <code>WP_REST_Request</code> objects are automatically generated for you whenever you make an HTTP request to a registered route. The data specified in the request will determine what response you get back out of the API. There are a lot of neat things you can do using the request class. The request section will go into greater detail.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="responses" tabindex="-1">Responses <a href="#responses" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Responses</span></a></h3> <p>Responses are the data you get back from the API. The <code>WP_REST_Response</code> provides a way to interact with the response data returned by endpoints. Responses can return the desired data, and they can also be used to return errors.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="schema" tabindex="-1">Schema <a href="#schema" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Schema</span></a></h3> <p>Each endpoint requires and provides slightly different data structures, and those structures are defined in the API Schema. The schema structures API data and provides a comprehensive list of all of the properties the API can return and input parameters it can accept. Schema also provides security benefits for the API, as it enables us to validate the requests being made to the API. The Schema section further explores this large topic.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="controller-classes" tabindex="-1">Controller Classes <a href="#controller-classes" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Controller Classes</span></a></h3> <p>As you can see, the WordPress REST API has a lot of moving parts that all need to work together. Controller classes bring all of these elements together in a single place. With a controller class you can manage the registration of routes & endpoints, handle requests, utilize schema, and generate API responses.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="next-steps" tabindex="-1">Next Steps <a href="#next-steps" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Next Steps</span></a></h2> <p>Let’s look at the reference for the WordPress REST API.</p> <div class="bottom-of-entry"> </div> <nav class="handbook-navigation" role="navigation"> <h1 class="screen-reader-text">Handbook navigation</h1> <div class="nav-links"> <a href="https://developer.wordpress.org/rest-api/reference/" rel="next">Reference <span class="meta-nav">→</span></a> </div> <!-- .nav-links --> </nav><!-- .navigation --> </main><!-- #main --> <div id="sidebar" class="widget-area sidebar section" role="complementary"> <aside id="nav_menu-4" class="widget widget_nav_menu"><h1 class="widget-title">Chapters</h1><div class="menu-rest-api-table-of-contents-container"><ul id="menu-rest-api-table-of-contents" class="menu"><li id="menu-item-22855" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook current-menu-item menu-item-22855"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></li> <li id="menu-item-23109" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-has-children menu-item-23109"><a href="https://developer.wordpress.org/rest-api/reference/">Reference</a> <ul class="sub-menu"> <li id="menu-item-23136" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23136"><a href="https://developer.wordpress.org/rest-api/reference/posts/">Posts</a></li> <li id="menu-item-23139" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23139"><a href="https://developer.wordpress.org/rest-api/reference/post-revisions/">Post Revisions</a></li> <li id="menu-item-23132" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23132"><a href="https://developer.wordpress.org/rest-api/reference/categories/">Categories</a></li> <li id="menu-item-23142" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23142"><a href="https://developer.wordpress.org/rest-api/reference/tags/">Tags</a></li> <li id="menu-item-23135" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23135"><a href="https://developer.wordpress.org/rest-api/reference/pages/">Pages</a></li> <li id="menu-item-23137" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23137"><a href="https://developer.wordpress.org/rest-api/reference/comments/">Comments</a></li> <li id="menu-item-23147" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23147"><a href="https://developer.wordpress.org/rest-api/reference/taxonomies/">Taxonomies</a></li> <li id="menu-item-23134" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23134"><a href="https://developer.wordpress.org/rest-api/reference/media/">Media</a></li> <li id="menu-item-23130" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23130"><a href="https://developer.wordpress.org/rest-api/reference/users/">Users</a></li> <li id="menu-item-23133" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23133"><a href="https://developer.wordpress.org/rest-api/reference/post-types/">Post Types</a></li> <li id="menu-item-23138" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23138"><a href="https://developer.wordpress.org/rest-api/reference/post-statuses/">Post Statuses</a></li> <li id="menu-item-23131" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23131"><a href="https://developer.wordpress.org/rest-api/reference/settings/">Settings</a></li> </ul> </li> <li id="menu-item-23174" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23174"><a href="https://developer.wordpress.org/rest-api/global-parameters/">Global Parameters</a></li> <li id="menu-item-23182" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23182"><a href="https://developer.wordpress.org/rest-api/linking-and-embedding/">Linking and Embedding</a></li> <li id="menu-item-23087" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23087"><a href="https://developer.wordpress.org/rest-api/discovery/">Discovery</a></li> <li id="menu-item-22864" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22864"><a href="https://developer.wordpress.org/rest-api/authentication/">Authentication</a></li> <li id="menu-item-23096" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23096"><a href="https://developer.wordpress.org/rest-api/adding-rest-api-support-for-custom-content-types/">Custom Content Types</a></li> <li id="menu-item-23084" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23084"><a href="https://developer.wordpress.org/rest-api/pagination/">Pagination</a></li> <li id="menu-item-22862" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22862"><a href="https://developer.wordpress.org/rest-api/routes-and-endpoints/">Routes and Endpoints</a></li> <li id="menu-item-22861" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22861"><a href="https://developer.wordpress.org/rest-api/controller-classes/">Controller Classes</a></li> <li id="menu-item-23187" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23187"><a href="https://developer.wordpress.org/rest-api/glossary/">Glossary</a></li> <li id="menu-item-22859" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22859"><a href="https://developer.wordpress.org/rest-api/schema/">Schema</a></li> </ul></div></aside> </div><!-- #secondary --> </div><!-- #primary --> </div><!-- #content --> </div><!-- #page --> <div id="wporg-footer"> <div class="wrapper"> <ul> <li><a href="//wordpress.org/about/" title="An introduction to the WordPress project">About</a></li> <li><a href="//wordpress.org/news/" title="News and Updates">Blog</a></li> <li><a href="//wordpress.org/hosting/" title="Recommended web hosting providers">Hosting</a></li> <li><a href="http://jobs.wordpress.net/" title="Find or post WordPress jobs">Jobs</a></li> </ul> <ul> <li><a href="//wordpress.org/support/" title="Forums, documentation, and other resources">Support</a></li> <li><a href="//developer.wordpress.org" title="Resources for WordPress developers">Developers</a></li> <li><a href="//make.wordpress.org/" title="Give back to WordPress through code, support, translation and more">Get Involved</a></li> <li><a href="//learn.wordpress.org/" title="Workshops and training materials">Learn</a></li> </ul> <ul> <li><a href="//wordpress.org/showcase/" title="Some of the best WordPress sites on the Web">Showcase</a></li> <li><a href="//wordpress.org/plugins/" title="Add extra functionality to WordPress">Plugins</a></li> <li><a href="//wordpress.org/themes/" title="Make your WordPress pretty">Themes</a></li> <li><a href="//wordpress.org/ideas/" title="Share your ideas for improving WordPress">Ideas</a></li> </ul> <ul> <li><a href="//central.wordcamp.org/" title="Find a WordPress event near you">WordCamp</a></li> <li><a href="//wordpress.tv/" title="Videos, tutorials, and WordCamp sessions">WordPress.TV</a></li> <li><a href="//buddypress.org/" title="A set of plugins to transform your WordPress into a social network">BuddyPress</a></li> <li><a href="//bbpress.org/" title="Fast, slick forums built on WordPress">bbPress</a></li> </ul> <ul> <li><a href="//wordpress.com/?ref=wporg-footer" title="Hassle-free WordPress hosting">WordPress.com</a></li> <li><a href="//ma.tt/" title="Co-founder of WordPress, an example of what WordPress can do">Matt</a></li> <li><a href="//wordpress.org/about/privacy/" title="WordPress.org Privacy Policy">Privacy</a></li> <li><a href="//wordpress.org/about/license/" title="WordPress is open source software">License / GPLv2</a></li> </ul> <ul> <li> <iframe title="Follow @WordPress on Twitter" allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=WordPress&show_count=false" style="width:135px; height:20px;"></iframe> </li> <li> <iframe title="Like WordPress on Facebook" src="//www.facebook.com/plugins/like.php?app_id=121415197926116&href=http%3A%2F%2Fwww.facebook.com%2Fwordpress&send=false&layout=button_count&width=135&show_faces=false&action=like&colorscheme=light&font=lucida+grande&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:135px; height:21px;" allowTransparency="true"></iframe> </li> <li> <script src="https://apis.google.com/js/platform.js" async defer></script> <div class="g-plusone" data-size="medium" data-href="https://plus.google.com/+WordPress"></div> </li> </ul> </div> <h6 class="aligncenter cip-image">Code is Poetry.</h6> </div> <script type="text/javascript"> var _qevents = _qevents || []; (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); </script> <script type="text/javascript">_qevents.push( { qacct:"p-18-mFEk4J448M"} );</script> <noscript><img src="//pixel.quantserve.com/pixel/p-18-mFEk4J448M.gif" style="display: none;" border="0" height="1" width="1" alt=""/></noscript> <!-- 12 queries. 0.189 seconds --> <script type="text/javascript" src="//gravatar.com/js/gprofiles.js"></script> <script type="text/javascript"> (function($){ $(document).ready(function() { $('#footer a').click(function() { if (this.href.indexOf('wordpress.org') == -1 && this.href.indexOf('http') == 0) { recordOutboundLink(this, 'Outbound Links', this.href); return false; } }); }); })(jQuery); </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/admin-bar.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/navigation.js?ver=20120206'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/skip-link-focus-fix.js?ver=20130115'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/search.js?ver=20150430'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/awesomplete.min.js?ver=20160322'></script> <script type='text/javascript'> /* <![CDATA[ */ var autocomplete = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"5dbde914f3"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/autocomplete.js?ver=20160524'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/function-reference.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var quicktagsL10n = {"closeAllOpenTags":"Close all open tags","closeTags":"close tags","enterURL":"Enter the URL","enterImageURL":"Enter the URL of the image","enterImageDescription":"Enter a description of the image","textdirection":"text direction","toggleTextdirection":"Toggle Editor Text Direction","dfw":"Distraction-free writing mode","strong":"Bold","strongClose":"Close bold tag","em":"Italic","emClose":"Close italic tag","link":"Insert link","blockquote":"Blockquote","blockquoteClose":"Close blockquote tag","del":"Deleted text (strikethrough)","delClose":"Close deleted text tag","ins":"Inserted text","insClose":"Close inserted text tag","image":"Insert image","ul":"Bulleted list","ulClose":"Close bulleted list tag","ol":"Numbered list","olClose":"Close numbered list tag","li":"List item","liClose":"Close list item tag","code":"Code","codeClose":"Close code tag","more":"Insert Read More tag"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/quicktags.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/comment-reply.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/tabs.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var wporg_note_preview = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"91d41d0100","preview":"preview note","preview_empty":"Nothing to preview","is_admin":""}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes-preview.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/wp-embed.min.js?ver=4.8-alpha-39600'></script> <div id="wpadminbar" class="nojq nojs"> <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1">Skip to toolbar</a> <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="Toolbar" tabindex="0"> <ul id="wp-admin-bar-root-default" class="ab-top-menu"> <li id="wp-admin-bar-wp-logo" class="menupop"><a class="ab-item" aria-haspopup="true" href="https://developer.wordpress.org/wp-admin/user/about.php"><span class="ab-icon"></span><span class="screen-reader-text">About WordPress</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-wp-logo-default" class="ab-submenu"> <li id="wp-admin-bar-about"><a class="ab-item" href="https://developer.wordpress.org/wp-admin/user/about.php">About WordPress</a> </li></ul><ul id="wp-admin-bar-wp-logo-external" class="ab-sub-secondary ab-submenu"> <li id="wp-admin-bar-wporg"><a class="ab-item" href="https://wordpress.org/">WordPress.org</a> </li> <li id="wp-admin-bar-documentation"><a class="ab-item" href="https://codex.wordpress.org/">Documentation</a> </li> <li id="wp-admin-bar-support-forums"><a class="ab-item" href="https://wordpress.org/support/">Support Forums</a> </li> <li id="wp-admin-bar-feedback"><a class="ab-item" href="https://wordpress.org/support/forum/requests-and-feedback">Feedback</a> </li></ul></div> </li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu"> <li id="wp-admin-bar-search" class="admin-bar-search"><div class="ab-item ab-empty-item" tabindex="-1"><form action="https://developer.wordpress.org/" method="get" id="adminbarsearch"><input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" /><label for="adminbar-search" class="screen-reader-text">Search</label><input type="submit" class="adminbar-button" value="Search"/></form></div> </li> <li id="wp-admin-bar-log-in"><a class="ab-item" href="https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2F">Log In</a> </li></ul> </div> </div> </body> </html>
        [WARNING]: [cURL] Communication with WordPress.org suceeded after 1.533 seconds, but an unexpected response was received: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="http://gmpg.org/xfn/11"> <meta charset="utf-8" /> <!-- <meta property="fb:page_id" content="6427302910" /> --> <meta name="google-site-verification" content="7VWES_-rcHBcmaQis9mSYamPfNwE03f4vyTj4pfuAw0" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="noodp"> <title>REST API Handbook | WordPress Developer Resources</title> <meta name="referrer" content="always"> <link href="//s.w.org/wp-includes/css/dashicons.css?20160504" rel="stylesheet" type="text/css" /> <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="//s.w.org/style/wp4.css?53" /> <link media="only screen and (max-device-width: 480px)" href="//s.w.org/style/iphone.css?1" type="text/css" rel="stylesheet" /> <link rel="shortcut icon" href="//s.w.org/favicon.ico?2" type="image/x-icon" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-52447-1']); _gaq.push(['_setDomainName', 'wordpress.org']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function recordOutboundLink(link, category, action) { _gaq.push(['_trackEvent', category, action]) setTimeout('document.location = "' + link.href + '"', 100); } </script> <!--[if lte IE 8]> <style type="text/css"> @import url("//s.w.org/style/ie.css?1"); </style> <![endif]--> <link rel="pingback" href="https://developer.wordpress.org/xmlrpc.php" /><link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Feed" href="https://developer.wordpress.org/feed/" /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Comments Feed" href="https://developer.wordpress.org/comments/feed/" /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/developer.wordpress.org\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.8-alpha-39600"}}; !function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),!(j.toDataURL().length<3e3)&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,65039,8205,55356,57096),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,55356,57096),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55357,56425,55356,57341,8205,55357,56507),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55357,56425,55356,57341,55357,56507),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='dashicons-css' href='https://developer.wordpress.org/wp-includes/css/dashicons.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='https://developer.wordpress.org/wp-includes/css/admin-bar.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-handbook-css-css' href='https://developer.wordpress.org/wp-content/plugins/handbook/stylesheets/callout-boxes.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-developer-style-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/style.css?ver=2' type='text/css' media='all' /> <link rel='stylesheet' id='wp-dev-sass-compiled-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/main.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='awesomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/awesomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='autocomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/autocomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-core-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?ver=3.0.9b' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-theme-default-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?ver=3.0.9b' type='text/css' media='all' /> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/handbook/scripts/handbook.js?ver=20150930'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?ver=3.0.9b'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPhp.js?ver=3.0.9b'></script> <link rel='https://api.w.org/' href='https://developer.wordpress.org/wp-json/' /> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://developer.wordpress.org/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://developer.wordpress.org/wp-includes/wlwmanifest.xml" /> <link rel='next' title='Authentication' href='https://developer.wordpress.org/rest-api/authentication/' /> <meta name="generator" content="WordPress 4.8-alpha-39600" /> <link rel="canonical" href="https://developer.wordpress.org/rest-api/" /> <link rel='shortlink' href='https://developer.wordpress.org/?p=22832' /> <link rel="alternate" type="application/json+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F" /> <link rel="alternate" type="text/xml+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F&format=xml" /> <script type="text/javascript"> jQuery( '<style>.hide-if-js { display: none; }</style>' ).appendTo( 'head' ); jQuery( function($) { $( 'body' ).addClass('js'); } ); </script> <style type="text/css" media="print">#wpadminbar { display:none; }</style> <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } } </style> <style type="text/css" id="syntaxhighlighteranchor"></style> <script>document.cookie='devicePixelRatio='+((window.devicePixelRatio === undefined) ? 1 : window.devicePixelRatio)+'; path=/';</script> <script type="text/javascript"> var toggleMenu = function(){ var m = document.getElementById('wporg-header-menu'), c = m.className; m.className = c.match( ' active' ) ? c.replace( ' active', '' ) : c + ' active'; } </script> </head> <body id="wordpress-org" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support single-handbook"> <div id="wporg-header"> <div class="wrapper"> <a id="mobile-menu-button" class="" href="#" onclick="toggleMenu();"></a> <h1><a href="//wordpress.org">WordPress.org</a></h1> <div id="head-search"> <form action="//wordpress.org/search/do-search.php" method="get"> <label for="global-search" class="screen-reader-text">Search WordPress.org for:</label> <input id="global-search" class="text" name="search" type="text" value="" maxlength="150" placeholder="Search WordPress.org" /> <input type="submit" class="button" value="" /> </form> </div> <div style="clear:both"></div> <ul id="wporg-header-menu"> <li><a href='//wordpress.org/showcase/' title='See some of the sites built on WordPress.'>Showcase</a></li> <li><a href='//wordpress.org/themes/' title='Find just the right look for your website.'>Themes</a></li> <li><a href='//wordpress.org/plugins/' title='Plugins can extend WordPress to do almost anything you can imagine.'>Plugins</a></li> <li><a href='//wordpress.org/mobile/' title='Take your website on the go!'>Mobile</a></li> <li><a href='//wordpress.org/support/' title='Forums, documentation, help.'>Support</a><ul class="nav-submenu"><li><a href='//wordpress.org/support/' title='Support and discussion forums.'>Forums</a></li><li><a href='//codex.wordpress.org/Main_Page' title='Documentation, tutorials, best practices.'>Documentation</a></li></ul><div class="uparrow"></div></li> <li><a href='//make.wordpress.org/' title='Contribute your knowledge.'>Get Involved</a></li> <li><a href='//wordpress.org/about/' title='About the WordPress Organization, and where we're going.'>About</a></li> <li><a href='//wordpress.org/news/' title='Come here for the latest scoop.'>Blog</a></li> <li><a href='//wordpress.org/hosting/' title='Find a home for your blog.'>Hosting</a></li> <li id="download" class="button download-button"><a href='//wordpress.org/download/' title='Get it. Got it? Good.'>Download WordPress</a></li> </ul> <div style="clear:both"></div> </div> </div> <div id="page" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support hfeed site devhub-wrap single-handbook"> <a href="#main" class="screen-reader-text">Skip to content</a> <header id="masthead" class="site-header" role="banner"> <div class="inner-wrap"> <div class="site-branding"> <h1 class="site-title"> <a href="https://developer.wordpress.org/" rel="home">Developer Resources</a> </h1> </div> <div class="devhub-menu"> </div> </div><!-- .inner-wrap --> </header><!-- #masthead --> <div id="inner-search"> <div class="search-section section clear hide-if-js"> <form role="search" method="get" class="searchform searchform-handbook" action="https://developer.wordpress.org/rest-api/"> <div> <label> <label for="search-field" class="screen-reader-text">Search for:</label> <input type="text" id="search-field" class="search-field" placeholder="Search …" value="" name="s"> </label> <input type="submit" class="shiny-blue search-submit" value="Search"> </div> </form> </div><!-- /search-guide --> <div id="inner-search-icon-container"> <div id="inner-search-icon"> <div class="dashicons dashicons-search"><span class="screen-reader-text">Search</span></div> </div> </div> </div> <div id="content" class="site-content"> <div id="content-area" class="has-sidebar"> <div class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb"> <span class="trail-browse">Browse:</span> <span class="trail-begin"><a href="https://developer.wordpress.org" title="WordPress Developer Resources" rel="home">Home</a></span> <span class="sep">/</span> <span class="trail-inner"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></span> <span class="sep">/</span> <span class="trail-end">REST API Handbook</span> </div> <main id="main" class="site-main post-22832 rest-api-handbook type-rest-api-handbook status-publish hentry type-handbook" role="main"> <h1>REST API Handbook</h1> <style> .toc-jump { text-align: right; font-size: 12px; } .page .toc-heading { margin-top: -50px; padding-top: 50px !important; }</style><div class="table-of-contents"><h2>Topics</h2><ul class="items"><li><a href="#why-use-the-wordpress-rest-api">Why use the WordPress REST API</a></li> <li><a href="#key-concepts">Key Concepts</a> <ul> <li><a href="#routes-endpoints">Routes & Endpoints</a></li> <li><a href="#requests">Requests</a></li> <li><a href="#responses">Responses</a></li> <li><a href="#schema">Schema</a></li> <li><a href="#controller-classes">Controller Classes</a> </ul></li> <li><a href="#next-steps">Next Steps</a></ul> </div> <p>The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving <a href="https://en.wikipedia.org/wiki/JSON">JSON</a> (JavaScript Object Notation) objects. JSON is an open standard data format that is lightweight and human-readable, and looks like Objects do in JavaScript; hence the name. When you send content to or make a request to the API, the response will be returned in JSON. This enables developers to create, read and update WordPress content from client-side JavaScript or from external applications, even those written in languages beyond PHP.</p> <div class='callout callout-info'><p><span class="screen-reader-text">Note:</span> Looking for a list of the other APIs available within WordPress? You can find the <a href="https://codex.wordpress.org/WordPress_APIs">documentation here</a>.</p> </div> <h2 class="toc-heading" id="why-use-the-wordpress-rest-api" tabindex="-1">Why use the WordPress REST API <a href="#why-use-the-wordpress-rest-api" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Why use the WordPress REST API</span></a></h2> <p>The WordPress REST API makes it easier than ever to use WordPress in new and exciting ways, such as creating Single Page Applications on top of WordPress. You could create a plugin to provide an entirely new admin experiences for WordPress, or create a brand new interactive front-end experience.</p> <p>You would not even have to write the applications in PHP: any programming language that can make HTTP requests and interpret JSON can interact with WordPress through the REST API, from Node.js to Java and beyond.</p> <p>The WordPress REST API can also serve as a strong replacement for the admin-ajax API in core. By using the REST API, you can more easily structure the way you want to get data into and out of WordPress. AJAX calls can be greatly simplified by using the REST API, enabling you to spend less time accessing the data you need and more time creating better user experiences.</p> <p>Our imagination is the only limit to what can be done with the WordPress REST API. The bottom line is, if you want an structured, extensible, and simple way to get data in and out of WordPress over HTTP, you probably want to use the REST API. For all of its simplicity the REST API can feel quite complex at first, and we will attempt to break it down into smaller components so that we can easily piece together the full puzzle.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="key-concepts" tabindex="-1">Key Concepts <a href="#key-concepts" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Key Concepts</span></a></h2> <p>To get started with using the WordPress REST API we will break down some of the key concepts and terms associated with the API:</p> <ul> <li>Routes/Endpoints</li> <li>Requests</li> <li>Responses</li> <li>Schema</li> <li>Controller Classes</li> </ul> <p>Each of these concepts play a crucial role in using and understanding the WordPress REST API. Let’s briefly break them down so that we can later explore each in greater depth.</p> <h3 class="toc-heading" id="routes-endpoints" tabindex="-1">Routes & Endpoints <a href="#routes-endpoints" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Routes & Endpoints</span></a></h3> <p>A route, in the context of the WordPress REST API, is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an “endpoint”. To clarify: If we make a <code>GET</code> request to <code>http://oursite.com/wp-json/</code>, we will get a JSON response showing us what routes are available, and within each route, what endpoints are available. <code>/wp-json/</code> is a route itself and when a <code>GET</code> request is made it matches to the endpoint that displays what is known as the index for the WordPress REST API. We will learn how to register our own routes and endpoints in the following sections.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="requests" tabindex="-1">Requests <a href="#requests" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Requests</span></a></h3> <p>One of the primary classes in the  WordPress REST API infrastructure is <code>WP_REST_Request</code>. This class is used to store and retrieve information for the current request; requests can be submitted remotely via HTTP but may also be made internally from PHP with WordPress. <code>WP_REST_Request</code> objects are automatically generated for you whenever you make an HTTP request to a registered route. The data specified in the request will determine what response you get back out of the API. There are a lot of neat things you can do using the request class. The request section will go into greater detail.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="responses" tabindex="-1">Responses <a href="#responses" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Responses</span></a></h3> <p>Responses are the data you get back from the API. The <code>WP_REST_Response</code> provides a way to interact with the response data returned by endpoints. Responses can return the desired data, and they can also be used to return errors.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="schema" tabindex="-1">Schema <a href="#schema" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Schema</span></a></h3> <p>Each endpoint requires and provides slightly different data structures, and those structures are defined in the API Schema. The schema structures API data and provides a comprehensive list of all of the properties the API can return and input parameters it can accept. Schema also provides security benefits for the API, as it enables us to validate the requests being made to the API. The Schema section further explores this large topic.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="controller-classes" tabindex="-1">Controller Classes <a href="#controller-classes" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Controller Classes</span></a></h3> <p>As you can see, the WordPress REST API has a lot of moving parts that all need to work together. Controller classes bring all of these elements together in a single place. With a controller class you can manage the registration of routes & endpoints, handle requests, utilize schema, and generate API responses.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="next-steps" tabindex="-1">Next Steps <a href="#next-steps" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Next Steps</span></a></h2> <p>Let’s look at the reference for the WordPress REST API.</p> <div class="bottom-of-entry"> </div> <nav class="handbook-navigation" role="navigation"> <h1 class="screen-reader-text">Handbook navigation</h1> <div class="nav-links"> <a href="https://developer.wordpress.org/rest-api/reference/" rel="next">Reference <span class="meta-nav">→</span></a> </div> <!-- .nav-links --> </nav><!-- .navigation --> </main><!-- #main --> <div id="sidebar" class="widget-area sidebar section" role="complementary"> <aside id="nav_menu-4" class="widget widget_nav_menu"><h1 class="widget-title">Chapters</h1><div class="menu-rest-api-table-of-contents-container"><ul id="menu-rest-api-table-of-contents" class="menu"><li id="menu-item-22855" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook current-menu-item menu-item-22855"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></li> <li id="menu-item-23109" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-has-children menu-item-23109"><a href="https://developer.wordpress.org/rest-api/reference/">Reference</a> <ul class="sub-menu"> <li id="menu-item-23136" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23136"><a href="https://developer.wordpress.org/rest-api/reference/posts/">Posts</a></li> <li id="menu-item-23139" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23139"><a href="https://developer.wordpress.org/rest-api/reference/post-revisions/">Post Revisions</a></li> <li id="menu-item-23132" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23132"><a href="https://developer.wordpress.org/rest-api/reference/categories/">Categories</a></li> <li id="menu-item-23142" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23142"><a href="https://developer.wordpress.org/rest-api/reference/tags/">Tags</a></li> <li id="menu-item-23135" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23135"><a href="https://developer.wordpress.org/rest-api/reference/pages/">Pages</a></li> <li id="menu-item-23137" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23137"><a href="https://developer.wordpress.org/rest-api/reference/comments/">Comments</a></li> <li id="menu-item-23147" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23147"><a href="https://developer.wordpress.org/rest-api/reference/taxonomies/">Taxonomies</a></li> <li id="menu-item-23134" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23134"><a href="https://developer.wordpress.org/rest-api/reference/media/">Media</a></li> <li id="menu-item-23130" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23130"><a href="https://developer.wordpress.org/rest-api/reference/users/">Users</a></li> <li id="menu-item-23133" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23133"><a href="https://developer.wordpress.org/rest-api/reference/post-types/">Post Types</a></li> <li id="menu-item-23138" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23138"><a href="https://developer.wordpress.org/rest-api/reference/post-statuses/">Post Statuses</a></li> <li id="menu-item-23131" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23131"><a href="https://developer.wordpress.org/rest-api/reference/settings/">Settings</a></li> </ul> </li> <li id="menu-item-23174" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23174"><a href="https://developer.wordpress.org/rest-api/global-parameters/">Global Parameters</a></li> <li id="menu-item-23182" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23182"><a href="https://developer.wordpress.org/rest-api/linking-and-embedding/">Linking and Embedding</a></li> <li id="menu-item-23087" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23087"><a href="https://developer.wordpress.org/rest-api/discovery/">Discovery</a></li> <li id="menu-item-22864" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22864"><a href="https://developer.wordpress.org/rest-api/authentication/">Authentication</a></li> <li id="menu-item-23096" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23096"><a href="https://developer.wordpress.org/rest-api/adding-rest-api-support-for-custom-content-types/">Custom Content Types</a></li> <li id="menu-item-23084" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23084"><a href="https://developer.wordpress.org/rest-api/pagination/">Pagination</a></li> <li id="menu-item-22862" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22862"><a href="https://developer.wordpress.org/rest-api/routes-and-endpoints/">Routes and Endpoints</a></li> <li id="menu-item-22861" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22861"><a href="https://developer.wordpress.org/rest-api/controller-classes/">Controller Classes</a></li> <li id="menu-item-23187" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23187"><a href="https://developer.wordpress.org/rest-api/glossary/">Glossary</a></li> <li id="menu-item-22859" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22859"><a href="https://developer.wordpress.org/rest-api/schema/">Schema</a></li> </ul></div></aside> </div><!-- #secondary --> </div><!-- #primary --> </div><!-- #content --> </div><!-- #page --> <div id="wporg-footer"> <div class="wrapper"> <ul> <li><a href="//wordpress.org/about/" title="An introduction to the WordPress project">About</a></li> <li><a href="//wordpress.org/news/" title="News and Updates">Blog</a></li> <li><a href="//wordpress.org/hosting/" title="Recommended web hosting providers">Hosting</a></li> <li><a href="http://jobs.wordpress.net/" title="Find or post WordPress jobs">Jobs</a></li> </ul> <ul> <li><a href="//wordpress.org/support/" title="Forums, documentation, and other resources">Support</a></li> <li><a href="//developer.wordpress.org" title="Resources for WordPress developers">Developers</a></li> <li><a href="//make.wordpress.org/" title="Give back to WordPress through code, support, translation and more">Get Involved</a></li> <li><a href="//learn.wordpress.org/" title="Workshops and training materials">Learn</a></li> </ul> <ul> <li><a href="//wordpress.org/showcase/" title="Some of the best WordPress sites on the Web">Showcase</a></li> <li><a href="//wordpress.org/plugins/" title="Add extra functionality to WordPress">Plugins</a></li> <li><a href="//wordpress.org/themes/" title="Make your WordPress pretty">Themes</a></li> <li><a href="//wordpress.org/ideas/" title="Share your ideas for improving WordPress">Ideas</a></li> </ul> <ul> <li><a href="//central.wordcamp.org/" title="Find a WordPress event near you">WordCamp</a></li> <li><a href="//wordpress.tv/" title="Videos, tutorials, and WordCamp sessions">WordPress.TV</a></li> <li><a href="//buddypress.org/" title="A set of plugins to transform your WordPress into a social network">BuddyPress</a></li> <li><a href="//bbpress.org/" title="Fast, slick forums built on WordPress">bbPress</a></li> </ul> <ul> <li><a href="//wordpress.com/?ref=wporg-footer" title="Hassle-free WordPress hosting">WordPress.com</a></li> <li><a href="//ma.tt/" title="Co-founder of WordPress, an example of what WordPress can do">Matt</a></li> <li><a href="//wordpress.org/about/privacy/" title="WordPress.org Privacy Policy">Privacy</a></li> <li><a href="//wordpress.org/about/license/" title="WordPress is open source software">License / GPLv2</a></li> </ul> <ul> <li> <iframe title="Follow @WordPress on Twitter" allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=WordPress&show_count=false" style="width:135px; height:20px;"></iframe> </li> <li> <iframe title="Like WordPress on Facebook" src="//www.facebook.com/plugins/like.php?app_id=121415197926116&href=http%3A%2F%2Fwww.facebook.com%2Fwordpress&send=false&layout=button_count&width=135&show_faces=false&action=like&colorscheme=light&font=lucida+grande&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:135px; height:21px;" allowTransparency="true"></iframe> </li> <li> <script src="https://apis.google.com/js/platform.js" async defer></script> <div class="g-plusone" data-size="medium" data-href="https://plus.google.com/+WordPress"></div> </li> </ul> </div> <h6 class="aligncenter cip-image">Code is Poetry.</h6> </div> <script type="text/javascript"> var _qevents = _qevents || []; (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); </script> <script type="text/javascript">_qevents.push( { qacct:"p-18-mFEk4J448M"} );</script> <noscript><img src="//pixel.quantserve.com/pixel/p-18-mFEk4J448M.gif" style="display: none;" border="0" height="1" width="1" alt=""/></noscript> <!-- 12 queries. 0.189 seconds --> <script type="text/javascript" src="//gravatar.com/js/gprofiles.js"></script> <script type="text/javascript"> (function($){ $(document).ready(function() { $('#footer a').click(function() { if (this.href.indexOf('wordpress.org') == -1 && this.href.indexOf('http') == 0) { recordOutboundLink(this, 'Outbound Links', this.href); return false; } }); }); })(jQuery); </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/admin-bar.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/navigation.js?ver=20120206'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/skip-link-focus-fix.js?ver=20130115'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/search.js?ver=20150430'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/awesomplete.min.js?ver=20160322'></script> <script type='text/javascript'> /* <![CDATA[ */ var autocomplete = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"5dbde914f3"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/autocomplete.js?ver=20160524'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/function-reference.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var quicktagsL10n = {"closeAllOpenTags":"Close all open tags","closeTags":"close tags","enterURL":"Enter the URL","enterImageURL":"Enter the URL of the image","enterImageDescription":"Enter a description of the image","textdirection":"text direction","toggleTextdirection":"Toggle Editor Text Direction","dfw":"Distraction-free writing mode","strong":"Bold","strongClose":"Close bold tag","em":"Italic","emClose":"Close italic tag","link":"Insert link","blockquote":"Blockquote","blockquoteClose":"Close blockquote tag","del":"Deleted text (strikethrough)","delClose":"Close deleted text tag","ins":"Inserted text","insClose":"Close inserted text tag","image":"Insert image","ul":"Bulleted list","ulClose":"Close bulleted list tag","ol":"Numbered list","olClose":"Close numbered list tag","li":"List item","liClose":"Close list item tag","code":"Code","codeClose":"Close code tag","more":"Insert Read More tag"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/quicktags.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/comment-reply.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/tabs.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var wporg_note_preview = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"91d41d0100","preview":"preview note","preview_empty":"Nothing to preview","is_admin":""}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes-preview.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/wp-embed.min.js?ver=4.8-alpha-39600'></script> <div id="wpadminbar" class="nojq nojs"> <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1">Skip to toolbar</a> <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="Toolbar" tabindex="0"> <ul id="wp-admin-bar-root-default" class="ab-top-menu"> <li id="wp-admin-bar-wp-logo" class="menupop"><a class="ab-item" aria-haspopup="true" href="https://developer.wordpress.org/wp-admin/user/about.php"><span class="ab-icon"></span><span class="screen-reader-text">About WordPress</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-wp-logo-default" class="ab-submenu"> <li id="wp-admin-bar-about"><a class="ab-item" href="https://developer.wordpress.org/wp-admin/user/about.php">About WordPress</a> </li></ul><ul id="wp-admin-bar-wp-logo-external" class="ab-sub-secondary ab-submenu"> <li id="wp-admin-bar-wporg"><a class="ab-item" href="https://wordpress.org/">WordPress.org</a> </li> <li id="wp-admin-bar-documentation"><a class="ab-item" href="https://codex.wordpress.org/">Documentation</a> </li> <li id="wp-admin-bar-support-forums"><a class="ab-item" href="https://wordpress.org/support/">Support Forums</a> </li> <li id="wp-admin-bar-feedback"><a class="ab-item" href="https://wordpress.org/support/forum/requests-and-feedback">Feedback</a> </li></ul></div> </li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu"> <li id="wp-admin-bar-search" class="admin-bar-search"><div class="ab-item ab-empty-item" tabindex="-1"><form action="https://developer.wordpress.org/" method="get" id="adminbarsearch"><input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" /><label for="adminbar-search" class="screen-reader-text">Search</label><input type="submit" class="adminbar-button" value="Search"/></form></div> </li> <li id="wp-admin-bar-log-in"><a class="ab-item" href="https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2F">Log In</a> </li></ul> </div> </div> </body> </html>
        [WARNING]: [cURL with a POST body] Communication with WordPress.org suceeded after 1.518 seconds, but an unexpected response was received: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-US"> <head profile="http://gmpg.org/xfn/11"> <meta charset="utf-8" /> <!-- <meta property="fb:page_id" content="6427302910" /> --> <meta name="google-site-verification" content="7VWES_-rcHBcmaQis9mSYamPfNwE03f4vyTj4pfuAw0" /> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="robots" content="noodp"> <title>REST API Handbook | WordPress Developer Resources</title> <meta name="referrer" content="always"> <link href="//s.w.org/wp-includes/css/dashicons.css?20160504" rel="stylesheet" type="text/css" /> <link href='//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,400,300,600&subset=latin,cyrillic-ext,greek-ext,greek,vietnamese,latin-ext,cyrillic' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="//s.w.org/style/wp4.css?53" /> <link media="only screen and (max-device-width: 480px)" href="//s.w.org/style/iphone.css?1" type="text/css" rel="stylesheet" /> <link rel="shortcut icon" href="//s.w.org/favicon.ico?2" type="image/x-icon" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-52447-1']); _gaq.push(['_setDomainName', 'wordpress.org']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); function recordOutboundLink(link, category, action) { _gaq.push(['_trackEvent', category, action]) setTimeout('document.location = "' + link.href + '"', 100); } </script> <!--[if lte IE 8]> <style type="text/css"> @import url("//s.w.org/style/ie.css?1"); </style> <![endif]--> <link rel="pingback" href="https://developer.wordpress.org/xmlrpc.php" /><link rel='dns-prefetch' href='//fonts.googleapis.com' /> <link rel='dns-prefetch' href='//s.w.org' /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Feed" href="https://developer.wordpress.org/feed/" /> <link rel="alternate" type="application/rss+xml" title="WordPress Developer Resources » Comments Feed" href="https://developer.wordpress.org/comments/feed/" /> <script type="text/javascript"> window._wpemojiSettings = {"baseUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/72x72\/","ext":".png","svgUrl":"https:\/\/s.w.org\/images\/core\/emoji\/2.2.1\/svg\/","svgExt":".svg","source":{"concatemoji":"https:\/\/developer.wordpress.org\/wp-includes\/js\/wp-emoji-release.min.js?ver=4.8-alpha-39600"}}; !function(a,b,c){function d(a){var b,c,d,e,f=String.fromCharCode;if(!k||!k.fillText)return!1;switch(k.clearRect(0,0,j.width,j.height),k.textBaseline="top",k.font="600 32px Arial",a){case"flag":return k.fillText(f(55356,56826,55356,56819),0,0),!(j.toDataURL().length<3e3)&&(k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,65039,8205,55356,57096),0,0),b=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55356,57331,55356,57096),0,0),c=j.toDataURL(),b!==c);case"emoji4":return k.fillText(f(55357,56425,55356,57341,8205,55357,56507),0,0),d=j.toDataURL(),k.clearRect(0,0,j.width,j.height),k.fillText(f(55357,56425,55356,57341,55357,56507),0,0),e=j.toDataURL(),d!==e}return!1}function e(a){var c=b.createElement("script");c.src=a,c.defer=c.type="text/javascript",b.getElementsByTagName("head")[0].appendChild(c)}var f,g,h,i,j=b.createElement("canvas"),k=j.getContext&&j.getContext("2d");for(i=Array("flag","emoji4"),c.supports={everything:!0,everythingExceptFlag:!0},h=0;h<i.length;h++)c.supports[i[h]]=d(i[h]),c.supports.everything=c.supports.everything&&c.supports[i[h]],"flag"!==i[h]&&(c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&c.supports[i[h]]);c.supports.everythingExceptFlag=c.supports.everythingExceptFlag&&!c.supports.flag,c.DOMReady=!1,c.readyCallback=function(){c.DOMReady=!0},c.supports.everything||(g=function(){c.readyCallback()},b.addEventListener?(b.addEventListener("DOMContentLoaded",g,!1),a.addEventListener("load",g,!1)):(a.attachEvent("onload",g),b.attachEvent("onreadystatechange",function(){"complete"===b.readyState&&c.readyCallback()})),f=c.source||{},f.concatemoji?e(f.concatemoji):f.wpemoji&&f.twemoji&&(e(f.twemoji),e(f.wpemoji)))}(window,document,window._wpemojiSettings); </script> <style type="text/css"> img.wp-smiley, img.emoji { display: inline !important; border: none !important; box-shadow: none !important; height: 1em !important; width: 1em !important; margin: 0 .07em !important; vertical-align: -0.1em !important; background: none !important; padding: 0 !important; } </style> <link rel='stylesheet' id='dashicons-css' href='https://developer.wordpress.org/wp-includes/css/dashicons.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='admin-bar-css' href='https://developer.wordpress.org/wp-includes/css/admin-bar.min.css?ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-handbook-css-css' href='https://developer.wordpress.org/wp-content/plugins/handbook/stylesheets/callout-boxes.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans%3A300italic%2C400italic%2C600italic%2C300%2C400%2C600&subset=latin%2Clatin-ext&ver=4.8-alpha-39600' type='text/css' media='all' /> <link rel='stylesheet' id='wporg-developer-style-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/style.css?ver=2' type='text/css' media='all' /> <link rel='stylesheet' id='wp-dev-sass-compiled-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/main.css?ver=20161206' type='text/css' media='all' /> <link rel='stylesheet' id='awesomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/awesomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='autocomplete-css-css' href='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/stylesheets/autocomplete.css?ver=20160114' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-core-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shCore.css?ver=3.0.9b' type='text/css' media='all' /> <link rel='stylesheet' id='syntaxhighlighter-theme-default-css' href='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/styles/shThemeDefault.css?ver=3.0.9b' type='text/css' media='all' /> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery.js?ver=1.12.4'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=1.4.1'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/handbook/scripts/handbook.js?ver=20150930'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?ver=3.0.9b'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/plugins/syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPhp.js?ver=3.0.9b'></script> <link rel='https://api.w.org/' href='https://developer.wordpress.org/wp-json/' /> <link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://developer.wordpress.org/xmlrpc.php?rsd" /> <link rel="wlwmanifest" type="application/wlwmanifest+xml" href="https://developer.wordpress.org/wp-includes/wlwmanifest.xml" /> <link rel='next' title='Authentication' href='https://developer.wordpress.org/rest-api/authentication/' /> <meta name="generator" content="WordPress 4.8-alpha-39600" /> <link rel="canonical" href="https://developer.wordpress.org/rest-api/" /> <link rel='shortlink' href='https://developer.wordpress.org/?p=22832' /> <link rel="alternate" type="application/json+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F" /> <link rel="alternate" type="text/xml+oembed" href="https://developer.wordpress.org/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fdeveloper.wordpress.org%2Frest-api%2F&format=xml" /> <script type="text/javascript"> jQuery( '<style>.hide-if-js { display: none; }</style>' ).appendTo( 'head' ); jQuery( function($) { $( 'body' ).addClass('js'); } ); </script> <style type="text/css" media="print">#wpadminbar { display:none; }</style> <style type="text/css" media="screen"> html { margin-top: 32px !important; } * html body { margin-top: 32px !important; } @media screen and ( max-width: 782px ) { html { margin-top: 46px !important; } * html body { margin-top: 46px !important; } } </style> <style type="text/css" id="syntaxhighlighteranchor"></style> <script>document.cookie='devicePixelRatio='+((window.devicePixelRatio === undefined) ? 1 : window.devicePixelRatio)+'; path=/';</script> <script type="text/javascript"> var toggleMenu = function(){ var m = document.getElementById('wporg-header-menu'), c = m.className; m.className = c.match( ' active' ) ? c.replace( ' active', '' ) : c + ' active'; } </script> </head> <body id="wordpress-org" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support single-handbook"> <div id="wporg-header"> <div class="wrapper"> <a id="mobile-menu-button" class="" href="#" onclick="toggleMenu();"></a> <h1><a href="//wordpress.org">WordPress.org</a></h1> <div id="head-search"> <form action="//wordpress.org/search/do-search.php" method="get"> <label for="global-search" class="screen-reader-text">Search WordPress.org for:</label> <input id="global-search" class="text" name="search" type="text" value="" maxlength="150" placeholder="Search WordPress.org" /> <input type="submit" class="button" value="" /> </form> </div> <div style="clear:both"></div> <ul id="wporg-header-menu"> <li><a href='//wordpress.org/showcase/' title='See some of the sites built on WordPress.'>Showcase</a></li> <li><a href='//wordpress.org/themes/' title='Find just the right look for your website.'>Themes</a></li> <li><a href='//wordpress.org/plugins/' title='Plugins can extend WordPress to do almost anything you can imagine.'>Plugins</a></li> <li><a href='//wordpress.org/mobile/' title='Take your website on the go!'>Mobile</a></li> <li><a href='//wordpress.org/support/' title='Forums, documentation, help.'>Support</a><ul class="nav-submenu"><li><a href='//wordpress.org/support/' title='Support and discussion forums.'>Forums</a></li><li><a href='//codex.wordpress.org/Main_Page' title='Documentation, tutorials, best practices.'>Documentation</a></li></ul><div class="uparrow"></div></li> <li><a href='//make.wordpress.org/' title='Contribute your knowledge.'>Get Involved</a></li> <li><a href='//wordpress.org/about/' title='About the WordPress Organization, and where we're going.'>About</a></li> <li><a href='//wordpress.org/news/' title='Come here for the latest scoop.'>Blog</a></li> <li><a href='//wordpress.org/hosting/' title='Find a home for your blog.'>Hosting</a></li> <li id="download" class="button download-button"><a href='//wordpress.org/download/' title='Get it. Got it? Good.'>Download WordPress</a></li> </ul> <div style="clear:both"></div> </div> </div> <div id="page" class="rest-api-handbook-template-default single single-rest-api-handbook postid-22832 admin-bar no-customize-support hfeed site devhub-wrap single-handbook"> <a href="#main" class="screen-reader-text">Skip to content</a> <header id="masthead" class="site-header" role="banner"> <div class="inner-wrap"> <div class="site-branding"> <h1 class="site-title"> <a href="https://developer.wordpress.org/" rel="home">Developer Resources</a> </h1> </div> <div class="devhub-menu"> </div> </div><!-- .inner-wrap --> </header><!-- #masthead --> <div id="inner-search"> <div class="search-section section clear hide-if-js"> <form role="search" method="get" class="searchform searchform-handbook" action="https://developer.wordpress.org/rest-api/"> <div> <label> <label for="search-field" class="screen-reader-text">Search for:</label> <input type="text" id="search-field" class="search-field" placeholder="Search …" value="" name="s"> </label> <input type="submit" class="shiny-blue search-submit" value="Search"> </div> </form> </div><!-- /search-guide --> <div id="inner-search-icon-container"> <div id="inner-search-icon"> <div class="dashicons dashicons-search"><span class="screen-reader-text">Search</span></div> </div> </div> </div> <div id="content" class="site-content"> <div id="content-area" class="has-sidebar"> <div class="breadcrumb-trail breadcrumbs" itemprop="breadcrumb"> <span class="trail-browse">Browse:</span> <span class="trail-begin"><a href="https://developer.wordpress.org" title="WordPress Developer Resources" rel="home">Home</a></span> <span class="sep">/</span> <span class="trail-inner"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></span> <span class="sep">/</span> <span class="trail-end">REST API Handbook</span> </div> <main id="main" class="site-main post-22832 rest-api-handbook type-rest-api-handbook status-publish hentry type-handbook" role="main"> <h1>REST API Handbook</h1> <style> .toc-jump { text-align: right; font-size: 12px; } .page .toc-heading { margin-top: -50px; padding-top: 50px !important; }</style><div class="table-of-contents"><h2>Topics</h2><ul class="items"><li><a href="#why-use-the-wordpress-rest-api">Why use the WordPress REST API</a></li> <li><a href="#key-concepts">Key Concepts</a> <ul> <li><a href="#routes-endpoints">Routes & Endpoints</a></li> <li><a href="#requests">Requests</a></li> <li><a href="#responses">Responses</a></li> <li><a href="#schema">Schema</a></li> <li><a href="#controller-classes">Controller Classes</a> </ul></li> <li><a href="#next-steps">Next Steps</a></ul> </div> <p>The WordPress REST API provides API endpoints for WordPress data types that allow developers to interact with sites remotely by sending and receiving <a href="https://en.wikipedia.org/wiki/JSON">JSON</a> (JavaScript Object Notation) objects. JSON is an open standard data format that is lightweight and human-readable, and looks like Objects do in JavaScript; hence the name. When you send content to or make a request to the API, the response will be returned in JSON. This enables developers to create, read and update WordPress content from client-side JavaScript or from external applications, even those written in languages beyond PHP.</p> <div class='callout callout-info'><p><span class="screen-reader-text">Note:</span> Looking for a list of the other APIs available within WordPress? You can find the <a href="https://codex.wordpress.org/WordPress_APIs">documentation here</a>.</p> </div> <h2 class="toc-heading" id="why-use-the-wordpress-rest-api" tabindex="-1">Why use the WordPress REST API <a href="#why-use-the-wordpress-rest-api" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Why use the WordPress REST API</span></a></h2> <p>The WordPress REST API makes it easier than ever to use WordPress in new and exciting ways, such as creating Single Page Applications on top of WordPress. You could create a plugin to provide an entirely new admin experiences for WordPress, or create a brand new interactive front-end experience.</p> <p>You would not even have to write the applications in PHP: any programming language that can make HTTP requests and interpret JSON can interact with WordPress through the REST API, from Node.js to Java and beyond.</p> <p>The WordPress REST API can also serve as a strong replacement for the admin-ajax API in core. By using the REST API, you can more easily structure the way you want to get data into and out of WordPress. AJAX calls can be greatly simplified by using the REST API, enabling you to spend less time accessing the data you need and more time creating better user experiences.</p> <p>Our imagination is the only limit to what can be done with the WordPress REST API. The bottom line is, if you want an structured, extensible, and simple way to get data in and out of WordPress over HTTP, you probably want to use the REST API. For all of its simplicity the REST API can feel quite complex at first, and we will attempt to break it down into smaller components so that we can easily piece together the full puzzle.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="key-concepts" tabindex="-1">Key Concepts <a href="#key-concepts" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Key Concepts</span></a></h2> <p>To get started with using the WordPress REST API we will break down some of the key concepts and terms associated with the API:</p> <ul> <li>Routes/Endpoints</li> <li>Requests</li> <li>Responses</li> <li>Schema</li> <li>Controller Classes</li> </ul> <p>Each of these concepts play a crucial role in using and understanding the WordPress REST API. Let’s briefly break them down so that we can later explore each in greater depth.</p> <h3 class="toc-heading" id="routes-endpoints" tabindex="-1">Routes & Endpoints <a href="#routes-endpoints" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Routes & Endpoints</span></a></h3> <p>A route, in the context of the WordPress REST API, is a URI which can be mapped to different HTTP methods. The mapping of an individual HTTP method to a route is known as an “endpoint”. To clarify: If we make a <code>GET</code> request to <code>http://oursite.com/wp-json/</code>, we will get a JSON response showing us what routes are available, and within each route, what endpoints are available. <code>/wp-json/</code> is a route itself and when a <code>GET</code> request is made it matches to the endpoint that displays what is known as the index for the WordPress REST API. We will learn how to register our own routes and endpoints in the following sections.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="requests" tabindex="-1">Requests <a href="#requests" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Requests</span></a></h3> <p>One of the primary classes in the  WordPress REST API infrastructure is <code>WP_REST_Request</code>. This class is used to store and retrieve information for the current request; requests can be submitted remotely via HTTP but may also be made internally from PHP with WordPress. <code>WP_REST_Request</code> objects are automatically generated for you whenever you make an HTTP request to a registered route. The data specified in the request will determine what response you get back out of the API. There are a lot of neat things you can do using the request class. The request section will go into greater detail.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="responses" tabindex="-1">Responses <a href="#responses" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Responses</span></a></h3> <p>Responses are the data you get back from the API. The <code>WP_REST_Response</code> provides a way to interact with the response data returned by endpoints. Responses can return the desired data, and they can also be used to return errors.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="schema" tabindex="-1">Schema <a href="#schema" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Schema</span></a></h3> <p>Each endpoint requires and provides slightly different data structures, and those structures are defined in the API Schema. The schema structures API data and provides a comprehensive list of all of the properties the API can return and input parameters it can accept. Schema also provides security benefits for the API, as it enables us to validate the requests being made to the API. The Schema section further explores this large topic.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h3 class="toc-heading" id="controller-classes" tabindex="-1">Controller Classes <a href="#controller-classes" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Controller Classes</span></a></h3> <p>As you can see, the WordPress REST API has a lot of moving parts that all need to work together. Controller classes bring all of these elements together in a single place. With a controller class you can manage the registration of routes & endpoints, handle requests, utilize schema, and generate API responses.</p> <p class="toc-jump"><a href="#top">Top ↑</a></p><h2 class="toc-heading" id="next-steps" tabindex="-1">Next Steps <a href="#next-steps" class="anchor"><span aria-hidden="true">#</span><span class="screen-reader-text">Next Steps</span></a></h2> <p>Let’s look at the reference for the WordPress REST API.</p> <div class="bottom-of-entry"> </div> <nav class="handbook-navigation" role="navigation"> <h1 class="screen-reader-text">Handbook navigation</h1> <div class="nav-links"> <a href="https://developer.wordpress.org/rest-api/reference/" rel="next">Reference <span class="meta-nav">→</span></a> </div> <!-- .nav-links --> </nav><!-- .navigation --> </main><!-- #main --> <div id="sidebar" class="widget-area sidebar section" role="complementary"> <aside id="nav_menu-4" class="widget widget_nav_menu"><h1 class="widget-title">Chapters</h1><div class="menu-rest-api-table-of-contents-container"><ul id="menu-rest-api-table-of-contents" class="menu"><li id="menu-item-22855" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook current-menu-item menu-item-22855"><a href="https://developer.wordpress.org/rest-api/">REST API Handbook</a></li> <li id="menu-item-23109" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-has-children menu-item-23109"><a href="https://developer.wordpress.org/rest-api/reference/">Reference</a> <ul class="sub-menu"> <li id="menu-item-23136" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23136"><a href="https://developer.wordpress.org/rest-api/reference/posts/">Posts</a></li> <li id="menu-item-23139" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23139"><a href="https://developer.wordpress.org/rest-api/reference/post-revisions/">Post Revisions</a></li> <li id="menu-item-23132" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23132"><a href="https://developer.wordpress.org/rest-api/reference/categories/">Categories</a></li> <li id="menu-item-23142" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23142"><a href="https://developer.wordpress.org/rest-api/reference/tags/">Tags</a></li> <li id="menu-item-23135" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23135"><a href="https://developer.wordpress.org/rest-api/reference/pages/">Pages</a></li> <li id="menu-item-23137" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23137"><a href="https://developer.wordpress.org/rest-api/reference/comments/">Comments</a></li> <li id="menu-item-23147" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23147"><a href="https://developer.wordpress.org/rest-api/reference/taxonomies/">Taxonomies</a></li> <li id="menu-item-23134" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23134"><a href="https://developer.wordpress.org/rest-api/reference/media/">Media</a></li> <li id="menu-item-23130" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23130"><a href="https://developer.wordpress.org/rest-api/reference/users/">Users</a></li> <li id="menu-item-23133" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23133"><a href="https://developer.wordpress.org/rest-api/reference/post-types/">Post Types</a></li> <li id="menu-item-23138" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23138"><a href="https://developer.wordpress.org/rest-api/reference/post-statuses/">Post Statuses</a></li> <li id="menu-item-23131" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23131"><a href="https://developer.wordpress.org/rest-api/reference/settings/">Settings</a></li> </ul> </li> <li id="menu-item-23174" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23174"><a href="https://developer.wordpress.org/rest-api/global-parameters/">Global Parameters</a></li> <li id="menu-item-23182" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23182"><a href="https://developer.wordpress.org/rest-api/linking-and-embedding/">Linking and Embedding</a></li> <li id="menu-item-23087" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23087"><a href="https://developer.wordpress.org/rest-api/discovery/">Discovery</a></li> <li id="menu-item-22864" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22864"><a href="https://developer.wordpress.org/rest-api/authentication/">Authentication</a></li> <li id="menu-item-23096" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23096"><a href="https://developer.wordpress.org/rest-api/adding-rest-api-support-for-custom-content-types/">Custom Content Types</a></li> <li id="menu-item-23084" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23084"><a href="https://developer.wordpress.org/rest-api/pagination/">Pagination</a></li> <li id="menu-item-22862" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22862"><a href="https://developer.wordpress.org/rest-api/routes-and-endpoints/">Routes and Endpoints</a></li> <li id="menu-item-22861" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22861"><a href="https://developer.wordpress.org/rest-api/controller-classes/">Controller Classes</a></li> <li id="menu-item-23187" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-23187"><a href="https://developer.wordpress.org/rest-api/glossary/">Glossary</a></li> <li id="menu-item-22859" class="menu-item menu-item-type-post_type menu-item-object-rest-api-handbook menu-item-22859"><a href="https://developer.wordpress.org/rest-api/schema/">Schema</a></li> </ul></div></aside> </div><!-- #secondary --> </div><!-- #primary --> </div><!-- #content --> </div><!-- #page --> <div id="wporg-footer"> <div class="wrapper"> <ul> <li><a href="//wordpress.org/about/" title="An introduction to the WordPress project">About</a></li> <li><a href="//wordpress.org/news/" title="News and Updates">Blog</a></li> <li><a href="//wordpress.org/hosting/" title="Recommended web hosting providers">Hosting</a></li> <li><a href="http://jobs.wordpress.net/" title="Find or post WordPress jobs">Jobs</a></li> </ul> <ul> <li><a href="//wordpress.org/support/" title="Forums, documentation, and other resources">Support</a></li> <li><a href="//developer.wordpress.org" title="Resources for WordPress developers">Developers</a></li> <li><a href="//make.wordpress.org/" title="Give back to WordPress through code, support, translation and more">Get Involved</a></li> <li><a href="//learn.wordpress.org/" title="Workshops and training materials">Learn</a></li> </ul> <ul> <li><a href="//wordpress.org/showcase/" title="Some of the best WordPress sites on the Web">Showcase</a></li> <li><a href="//wordpress.org/plugins/" title="Add extra functionality to WordPress">Plugins</a></li> <li><a href="//wordpress.org/themes/" title="Make your WordPress pretty">Themes</a></li> <li><a href="//wordpress.org/ideas/" title="Share your ideas for improving WordPress">Ideas</a></li> </ul> <ul> <li><a href="//central.wordcamp.org/" title="Find a WordPress event near you">WordCamp</a></li> <li><a href="//wordpress.tv/" title="Videos, tutorials, and WordCamp sessions">WordPress.TV</a></li> <li><a href="//buddypress.org/" title="A set of plugins to transform your WordPress into a social network">BuddyPress</a></li> <li><a href="//bbpress.org/" title="Fast, slick forums built on WordPress">bbPress</a></li> </ul> <ul> <li><a href="//wordpress.com/?ref=wporg-footer" title="Hassle-free WordPress hosting">WordPress.com</a></li> <li><a href="//ma.tt/" title="Co-founder of WordPress, an example of what WordPress can do">Matt</a></li> <li><a href="//wordpress.org/about/privacy/" title="WordPress.org Privacy Policy">Privacy</a></li> <li><a href="//wordpress.org/about/license/" title="WordPress is open source software">License / GPLv2</a></li> </ul> <ul> <li> <iframe title="Follow @WordPress on Twitter" allowtransparency="true" frameborder="0" scrolling="no" src="//platform.twitter.com/widgets/follow_button.html?screen_name=WordPress&show_count=false" style="width:135px; height:20px;"></iframe> </li> <li> <iframe title="Like WordPress on Facebook" src="//www.facebook.com/plugins/like.php?app_id=121415197926116&href=http%3A%2F%2Fwww.facebook.com%2Fwordpress&send=false&layout=button_count&width=135&show_faces=false&action=like&colorscheme=light&font=lucida+grande&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:135px; height:21px;" allowTransparency="true"></iframe> </li> <li> <script src="https://apis.google.com/js/platform.js" async defer></script> <div class="g-plusone" data-size="medium" data-href="https://plus.google.com/+WordPress"></div> </li> </ul> </div> <h6 class="aligncenter cip-image">Code is Poetry.</h6> </div> <script type="text/javascript"> var _qevents = _qevents || []; (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); </script> <script type="text/javascript">_qevents.push( { qacct:"p-18-mFEk4J448M"} );</script> <noscript><img src="//pixel.quantserve.com/pixel/p-18-mFEk4J448M.gif" style="display: none;" border="0" height="1" width="1" alt=""/></noscript> <!-- 12 queries. 0.189 seconds --> <script type="text/javascript" src="//gravatar.com/js/gprofiles.js"></script> <script type="text/javascript"> (function($){ $(document).ready(function() { $('#footer a').click(function() { if (this.href.indexOf('wordpress.org') == -1 && this.href.indexOf('http') == 0) { recordOutboundLink(this, 'Outbound Links', this.href); return false; } }); }); })(jQuery); </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/admin-bar.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/navigation.js?ver=20120206'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/skip-link-focus-fix.js?ver=20130115'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/search.js?ver=20150430'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/awesomplete.min.js?ver=20160322'></script> <script type='text/javascript'> /* <![CDATA[ */ var autocomplete = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"5dbde914f3"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/autocomplete.js?ver=20160524'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/function-reference.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var quicktagsL10n = {"closeAllOpenTags":"Close all open tags","closeTags":"close tags","enterURL":"Enter the URL","enterImageURL":"Enter the URL of the image","enterImageDescription":"Enter a description of the image","textdirection":"text direction","toggleTextdirection":"Toggle Editor Text Direction","dfw":"Distraction-free writing mode","strong":"Bold","strongClose":"Close bold tag","em":"Italic","emClose":"Close italic tag","link":"Insert link","blockquote":"Blockquote","blockquoteClose":"Close blockquote tag","del":"Deleted text (strikethrough)","delClose":"Close deleted text tag","ins":"Inserted text","insClose":"Close inserted text tag","image":"Insert image","ul":"Bulleted list","ulClose":"Close bulleted list tag","ol":"Numbered list","olClose":"Close numbered list tag","li":"List item","liClose":"Close list item tag","code":"Code","codeClose":"Close code tag","more":"Insert Read More tag"}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/quicktags.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/comment-reply.min.js?ver=4.8-alpha-39600'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/tabs.js?ver=20160824'></script> <script type='text/javascript'> /* <![CDATA[ */ var wporg_note_preview = {"ajaxurl":"https:\/\/developer.wordpress.org\/wp-admin\/admin-ajax.php","nonce":"91d41d0100","preview":"preview note","preview_empty":"Nothing to preview","is_admin":""}; /* ]]> */ </script> <script type='text/javascript' src='https://developer.wordpress.org/wp-content/themes/pub/wporg-developer/js/user-notes-preview.js?ver=20160824'></script> <script type='text/javascript' src='https://developer.wordpress.org/wp-includes/js/wp-embed.min.js?ver=4.8-alpha-39600'></script> <div id="wpadminbar" class="nojq nojs"> <a class="screen-reader-shortcut" href="#wp-toolbar" tabindex="1">Skip to toolbar</a> <div class="quicklinks" id="wp-toolbar" role="navigation" aria-label="Toolbar" tabindex="0"> <ul id="wp-admin-bar-root-default" class="ab-top-menu"> <li id="wp-admin-bar-wp-logo" class="menupop"><a class="ab-item" aria-haspopup="true" href="https://developer.wordpress.org/wp-admin/user/about.php"><span class="ab-icon"></span><span class="screen-reader-text">About WordPress</span></a><div class="ab-sub-wrapper"><ul id="wp-admin-bar-wp-logo-default" class="ab-submenu"> <li id="wp-admin-bar-about"><a class="ab-item" href="https://developer.wordpress.org/wp-admin/user/about.php">About WordPress</a> </li></ul><ul id="wp-admin-bar-wp-logo-external" class="ab-sub-secondary ab-submenu"> <li id="wp-admin-bar-wporg"><a class="ab-item" href="https://wordpress.org/">WordPress.org</a> </li> <li id="wp-admin-bar-documentation"><a class="ab-item" href="https://codex.wordpress.org/">Documentation</a> </li> <li id="wp-admin-bar-support-forums"><a class="ab-item" href="https://wordpress.org/support/">Support Forums</a> </li> <li id="wp-admin-bar-feedback"><a class="ab-item" href="https://wordpress.org/support/forum/requests-and-feedback">Feedback</a> </li></ul></div> </li></ul><ul id="wp-admin-bar-top-secondary" class="ab-top-secondary ab-top-menu"> <li id="wp-admin-bar-search" class="admin-bar-search"><div class="ab-item ab-empty-item" tabindex="-1"><form action="https://developer.wordpress.org/" method="get" id="adminbarsearch"><input class="adminbar-input" name="s" id="adminbar-search" type="text" value="" maxlength="150" /><label for="adminbar-search" class="screen-reader-text">Search</label><input type="submit" class="adminbar-button" value="Search"/></form></div> </li> <li id="wp-admin-bar-log-in"><a class="ab-item" href="https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2F">Log In</a> </li></ul> </div> </div> </body> </html>
        [INFO]: PHP Version: 7.0.14

    Das komische, diese Zeile verändert sich je nach „Gemütsstand vom WP-Backend“ zwischen FAIL und PASS: [PASS]: Verifying api.wordpress.org resolves correctly. 66.155.40.187

    Hat hier jemand eine Idee an was dies liegen kann?

    OS: Ubuntu 14.0.4 – Plesk 17 und Apache 2.4.7

Ansicht von 1 Antwort (von insgesamt 1)
Ansicht von 1 Antwort (von insgesamt 1)
  • Das Thema „HTTPS Tester – Fehlermeldung (Plugin Updates werden nicht angezeigt)“ ist für neue Antworten geschlossen.