PHP Logo

PHP CMS API and blog engine

ButterCMS is an API-based CMS that integrates with PHP. Use ButterCMS to rapidly build CMS-powered blogs, dynamic pages, and more.

Setup in minutes

Add the ButterCMS PHP library using Composer:

composer require buttercms/buttercms-php

Or download the latest release and include it manually:

require_once('/path/to/buttercms-php/src/ButterCMS.php');

Then test out some API calls in your application code:

use ButterCMS\ButterCMS;

$butter = new ButterCMS('api_token_b22ab734');

// Get homepage content
$butter->fetchContentFields(['homepage']);

// Get posts
$result = $butter->fetchPosts();

// Loop through posts
foreach ($result->getPosts() as $post) {
    echo $post->getTitle();
}

A simple API for content

{
  "data": {
    "homepage_title": "PHP",
    "homepage_headline": "API-first CMS and blog engine for PHP"
  }
}

About PHP

PHP is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

Get started now

Sign up with Google Sign up with Github
or