PHPackages                             deliciousbrains/spinupwp-php-sdk - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. deliciousbrains/spinupwp-php-sdk

Abandoned → [spinupwp/spinupwp-php-sdk](/?search=spinupwp%2Fspinupwp-php-sdk)Library[API Development](/categories/api)

deliciousbrains/spinupwp-php-sdk
================================

The official SpinupWP PHP SDK

v1.2.0(1mo ago)141.4k↓87.5%1[2 PRs](https://github.com/spinupwp/spinupwp-php-sdk/pulls)MITPHPPHP &gt;=7.4CI passing

Since Oct 6Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/spinupwp/spinupwp-php-sdk)[ Packagist](https://packagist.org/packages/deliciousbrains/spinupwp-php-sdk)[ RSS](/packages/deliciousbrains-spinupwp-php-sdk/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (18)Used By (0)

SpinupWP PHP SDK
================

[](#spinupwp-php-sdk)

[![Tests](https://github.com/spinupwp/spinupwp-php-sdk/actions/workflows/tests.yml/badge.svg?event=push)](https://github.com/spinupwp/spinupwp-php-sdk/actions/workflows/tests.yml)[![Total Downloads](https://camo.githubusercontent.com/366a9280e6f06fc6bd8aea69829475306c726535e679b3dffcc4546ae25ad005/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370696e757077702f7370696e757077702d7068702d73646b)](https://packagist.org/packages/spinupwp/spinupwp-php-sdk)[![Latest Stable Version](https://camo.githubusercontent.com/224abe638edb1aa88e5b1f78627d88f58f14e8578fa390f5846d7615e4af4776/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370696e757077702f7370696e757077702d7068702d73646b)](https://packagist.org/packages/spinupwp/spinupwp-php-sdk)[![License](https://camo.githubusercontent.com/5b2c71da29181c41d8c723a101b3fb2b185fdf9ca4961b544383f4ced9b4789d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7370696e757077702f7370696e757077702d7068702d73646b)](https://packagist.org/packages/spinupwp/spinupwp-php-sdk)

The SpinupWP PHP SDK provides an expressive interface for interacting with [SpinupWP's API](https://api.spinupwp.com). It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.

Installation
------------

[](#installation)

To get started, require the package via [Composer](https://getcomposer.org):

```
composer require spinupwp/spinupwp-php-sdk
```

Usage
-----

[](#usage)

You can create an instance of the SpinupWP client like so:

```
$spinupwp = new SpinupWp\SpinupWp('API_TOKEN');
```

### Servers

[](#servers)

```
// Return a collection of servers
$servers = $spinupwp->servers->list();

// Return a single server
$server = $spinupwp->servers->get($serverId);

// Create and return a new server
$server = $spinupwp->servers->create([]);

// Create and return a new custom server
$server = $spinupwp->servers->createCustom([]);

// Delete a server
$eventId = $spinupwp->servers->delete($serverId, $deleteOnProvider);

// Reboot a server
$eventId = $spinupwp->servers->reboot($serverId);

// Restart the Nginx service on a server
$eventId = $spinupwp->servers->restartNginx($serverId);

// Restart the Redis service on a server
$eventId = $spinupwp->servers->restartRedis($serverId);

// Restart all versions of the PHP-FPM service installed on a server
$eventId = $spinupwp->servers->restartPhp($serverId);

// Restart the MySQL or MariaDB service on a server
$eventId = $spinupwp->servers->restartMysql($serverId);
```

On a `Server` instance you may also call:

```
// Return a collection of this server's sites
$sites = $server->sites();

// Delete the current server
$server->delete($deleteOnProvider);

// Reboot the current server
$server->reboot();

// Restart the Nginx service on the current server
$server->restartNginx();

// Restart the Redis service on the current server
$server->restartRedis();

// Restart all versions of the PHP-FPM service installed on the current server
$server->restartPhp();

// Restart the MySQL or MariaDB service on the current server
$server->restartMysql();
```

### Sites

[](#sites)

```
// Return a collection of sites
$sites = $spinupwp->sites->list();

// Return a single site
$site = $spinupwp->sites->get($siteId);

// Create and return a new site
$site = $spinupwp->sites->create($serverId, []);

// Delete a site
$eventId = $spinupwp->sites->delete($siteId);

// Run a git deployment
$eventId = $spinupwp->sites->gitDeploy($siteId);

// Purge a site's page cache
$eventId = $spinupwp->sites->purgePageCache($siteId);

// Purge a site's object cache
$eventId = $spinupwp->sites->purgeObjectCache($siteId);

// Reset a site's file permissions
$eventId = $spinupwp->sites->correctFilePermissions($siteId);
```

On a `Site` instance you may also call:

```
// Delete the current site
$site->delete();

// Run a git deployment
$site->gitDeploy();

// Purge a site's page cache
$site->purgePageCache();

// Purge a site's object cache
$site->purgeObjectCache();

// Reset a site's file permissions
$site->correctFilePermissions();
```

### Events

[](#events)

```
// Return a collection of events
$events = $spinupwp->events->list();

// Return a single event
$event = $spinupwp->events->get($eventId);
```

### SSH Key

[](#ssh-key)

```
// Return SpinupWP's SSH Public Key
$key = $spinupwp->sshKeys->get();
```

### Resource Collections

[](#resource-collections)

When retrieving a list of resources, an instance of `ResourceCollection` is returned. This class handles fetching large lists of resources without having to paginate results and perform subsequent requests manually.

```
$servers = $spinupwp->servers->list();

// Return an array of all servers
$servers->toArray();

// Return the total number of servers
$servers->count();

// Lazily iterate over all servers
foreach ($servers as $server) {
    // Do something with $server
}
```

License
-------

[](#license)

SpinupWP PHP SDK is open-sourced software licensed under the [MIT license](LICENSE.md).

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance90

Actively maintained with recent releases

Popularity25

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~147 days

Recently: every ~378 days

Total

12

Last Release

38d ago

Major Versions

v0.5.2 → v1.0.02022-08-23

### Community

Maintainers

![](https://www.gravatar.com/avatar/c404609458a1a91e293ba27bf9909ed84785fe13a30f8e731e24d851fbdbe4f2?d=identicon)[deliciousbrains](/maintainers/deliciousbrains)

---

Top Contributors

[![A5hleyRich](https://avatars.githubusercontent.com/u/1422996?v=4)](https://github.com/A5hleyRich "A5hleyRich (71 commits)")[![katelynnbarlowe](https://avatars.githubusercontent.com/u/31631674?v=4)](https://github.com/katelynnbarlowe "katelynnbarlowe (21 commits)")[![danielmlozano](https://avatars.githubusercontent.com/u/7433870?v=4)](https://github.com/danielmlozano "danielmlozano (19 commits)")[![Jamesclark32](https://avatars.githubusercontent.com/u/13315960?v=4)](https://github.com/Jamesclark32 "Jamesclark32 (15 commits)")[![georgefehr](https://avatars.githubusercontent.com/u/447372?v=4)](https://github.com/georgefehr "georgefehr (10 commits)")[![vbergerondev](https://avatars.githubusercontent.com/u/46461380?v=4)](https://github.com/vbergerondev "vbergerondev (8 commits)")[![ohryan](https://avatars.githubusercontent.com/u/195085?v=4)](https://github.com/ohryan "ohryan (5 commits)")

---

Tags

apiphpspinupwpapiSpinupWP

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/deliciousbrains-spinupwp-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/deliciousbrains-spinupwp-php-sdk/health.svg)](https://phpackages.com/packages/deliciousbrains-spinupwp-php-sdk)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mailchimp/transactional

458.9M16](/packages/mailchimp-transactional)[get-stream/stream-chat

A PHP client for Stream Chat (https://getstream.io/chat/)

301.8M2](/packages/get-stream-stream-chat)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[spinupwp/spinupwp-php-sdk

The official SpinupWP PHP SDK

148.2k1](/packages/spinupwp-spinupwp-php-sdk)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
