dot CMS

Unlock the Power of PHP with the New dotCMS PHP SDK

Unlock the Power of PHP with the New dotCMS PHP SDK

Share this article on:

Did you know that PHP powers nearly 80% of all websites? At dotCMS, we recognize the importance of PHP in web development, so we are excited to announce the launch of the dotCMS PHP SDK!

This SDK connects PHP's versatility with dotCMS's content management, allowing for quick creation of dynamic web applications using vanilla PHP or frameworks like Laravel and Symfony.


What does the dotCMS PHP SDK Do?

The SDK gives developers seamless access to page layouts, page content, and navigation data. It also allows developers to quickly integrate the dotCMS Universal Visual Editor so content teams can update content and layouts easily without developer involvement.

Imagine this: your development team enjoys the freedom and control of PHP, while your marketing team can effortlessly manage content through a user-friendly visual interface. This is the power of the dotCMS PHP SDK.


Key Benefits for Developers and Businesses

  • Accelerated Time-to-Market: Connect your PHP applications to dotCMS in less than 5 minutes. This speed significantly reduces development time and gets your projects launched faster.

  • Improved ROI: Faster development cycles translate to quicker project launches and a more rapid return on your investment. The SDK optimizes your workflow for maximum efficiency.

  • Empowered Content Authors: The Universal Visual Editor empowers non-technical users to update content, freeing up developers to focus on more complex tasks. This reduces bottlenecks and accelerates content updates.

  • Flexibility and Control: Leverage the control and flexibility of PHP development while benefiting from a powerful CMS.

  • Server-Side Rendering (SSR): Build projects that benefit from SSR, improving performance and SEO.


It's Easy to Get Started!

Connecting to dotCMS is surprisingly simple. Here's a quick example of how to retrieve a page using the SDK:

 

First, you can install the SDK using composer, the most used dependency manager for the PHP.

composer require dotcms/php-sdk

 

Then inside your project:

<?php

use Dotcms\PhpSdk\Config\Config;
use Dotcms\PhpSdk\DotCMSClient;
use Dotcms\PhpSdk\Config\LogLevel;

// 1.  Configuration: Set up your dotCMS connection details
$config = new Config(
    host: 'https://your.dotcms.host',
    apiKey: 'YOUR_API_KEY'
);

// 2. Create the DotCMS Client
$client = new DotCMSClient($config);

try {
    // 3.  Fetch a Page
    $pageRequest = $client->createPageRequest('/about-us', 'json'); // Specify the page path and format
    $page = $client->getPage($pageRequest);

    // Display Page Details
    echo "Page Title: " . $page->page->title . "<br>";

} catch (\Exception $e) {
    echo "Error: " . $e->getMessage() . "<br>";
}
?>

This is just a glimpse of how easily you can integrate dotCMS functionality into your PHP applications.


What's included?

The dotCMS PHP SDK is more than just a library. It's a complete solution that includes:

  • A robust PHP library for seamless connection to dotCMS APIs.

  • Example implementations for popular PHP frameworks like Laravel and Symfony, demonstrating best practices.

  • Ready-to-go dotCMS PHP pages that can be fully edited within the dotCMS Universal Visual Editor. This allows for a truly integrated content management and development experience.


Who is it For?

This SDK is perfect for:

  • Businesses with in-house or partner development teams proficient in PHP.

  • Organizations seeking the control and flexibility of PHP development.

  • Projects that require the performance and SEO advantages of server-side rendering.

  • Companies that want to empower their content editors with an intuitive visual editing experience.


Looking Ahead

We're committed to continuously improving the dotCMS PHP SDK. Future enhancements include:

  • Adding support for the dotCMS Content API for even more comprehensive content management capabilities.

  • Implementing a Type Safety Layer to further simplify development and reduce potential errors.


Get Started Today!

The dotCMS PHP SDK is free and open source. We encourage you to download it, explore its capabilities, and join our growing community. Unleash the combined power of PHP and dotCMS to build exceptional web experiences.

 

PHP SDK Documentation

 

We're excited to see what you create with the dotCMS PHP SDK!  Let us know how it goes in our dotCMS Community.

Recommended Reading
  • Driving Content Innovation: Our 2026 Roadmap
    3 Mar 26
    Innovation

    Driving Content Innovation: Our 2026 Roadmap

    Join VP of Product Freddy Montes for a walk through of the exciting things dotCMS is working on in 2026

    Freddy

    Freddy Montes

    VP of Prodcut

  • Content Style Editor: Visual Design Control Inside Your CMS
    20 Feb 26
    Content Management

    Content Style Editor: Visual Design Control Inside Your CMS

    Eliminate developer bottlenecks with the dotCMS Content Style Editor, empowering content teams to instantly customize component styling, improve content reuse, and accelerate publishing without code.

    Marc

    Marc Boutillette

    Outbound Product Manager

  • A UX-Driven Approach to Modernizing dotCMS
    15 Jan 26
    Product

    A UX-Driven Approach to Modernizing dotCMS

    Modernizing a CMS isn’t about fixing what’s broken, it’s about leading its evolution. In this post, we share how dotCMS is taking a UX-led approach to future-proof the platform, aligning usability, scalability, and long-term product strategy to support what’s next.

    Maria

    Maria Fernandez

    Product Manager (formerly Head of UX)

  • The Top 10 Enterprise Content Management Systems in 2026
    1 Jan 26
    Content Management

    The Top 10 Enterprise Content Management Systems in 2026

    Discover the top 10 enterprise content management platforms that can transform how your business manages and delivers digital content.

    Fatima

    Fatima Nasir Tareen

    Growth Marketing Specialist

Explore dotCMS for your organization

image

dotCMS Named a Major Player

In the IDC MarketScape: Worldwide AI-Enabled Headless CMS 2025 Vendor Assessment

image

Explore an interactive tour

See how dotCMS empowers technical and content teams at compliance-led organizations.

image

Schedule a custom demo

Schedule a custom demo with one of our experts and discover the capabilities of dotCMS for your business.