PHPackages                             pieceofcake2/seo - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. pieceofcake2/seo

ActiveCakephp-plugin[Utility &amp; Helpers](/categories/utility)

pieceofcake2/seo
================

CakePHP 2 Search Engine Optimization Plugin

v6.2.2(9mo ago)00MITPHPPHP ^8.0CI passing

Since Oct 6Pushed 9mo agoCompare

[ Source](https://github.com/pieceofcake2/seo)[ Packagist](https://packagist.org/packages/pieceofcake2/seo)[ RSS](/packages/pieceofcake2-seo/feed)WikiDiscussions 6.x Synced today

READMEChangelogDependencies (7)Versions (2)Used By (0)

Search Engine Optimization CakePHP Plugin
=========================================

[](#search-engine-optimization-cakephp-plugin)

[![GitHub License](https://camo.githubusercontent.com/eb3c2a79d1ce91f95b6e0129ad4642209345261ae9c4259ab784dd3579389ca9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f70696563656f6663616b65322f73656f3f6c6162656c3d4c6963656e7365)](LICENSE)[![Packagist Version](https://camo.githubusercontent.com/15430ac540ae9533aa6463fd5365619d6b2421333cd057fbe8a686204e47a89c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70696563656f6663616b65322f73656f3f6c6162656c3d5061636b6167697374)](https://packagist.org/packages/pieceofcake2/seo)[![PHP](https://camo.githubusercontent.com/cdd7873df65bdf046f07dace3e37f0111586076cf845f5ea7ba2e8a57ba1b983/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f73656f2f7068703f6c6f676f3d706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d504850266c6162656c436f6c6f723d25323337373742423426636f6c6f723d253233464646464646)](https://camo.githubusercontent.com/cdd7873df65bdf046f07dace3e37f0111586076cf845f5ea7ba2e8a57ba1b983/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f73656f2f7068703f6c6f676f3d706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d504850266c6162656c436f6c6f723d25323337373742423426636f6c6f723d253233464646464646)[![CakePHP](https://camo.githubusercontent.com/042734267a120cfa96e3446d4181df449bb2c35b844fa16c0ce00fc13dca5ce0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f73656f2f70696563656f6663616b65322f63616b657068703f6c6f676f3d63616b65706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d43616b65504850266c6162656c436f6c6f723d25323344333343343326636f6c6f723d253233464646464646)](https://camo.githubusercontent.com/042734267a120cfa96e3446d4181df449bb2c35b844fa16c0ce00fc13dca5ce0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f70696563656f6663616b65322f73656f2f70696563656f6663616b65322f63616b657068703f6c6f676f3d63616b65706870266c6f676f436f6c6f723d253233464646464646266c6162656c3d43616b65504850266c6162656c436f6c6f723d25323344333343343326636f6c6f723d253233464646464646)[![CI](https://camo.githubusercontent.com/3f42b611d30b07ae4b84f727ac56e6883fdbe99f5f04512070c6f78dab6f0f47/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70696563656f6663616b65322f73656f2f43492e796d6c3f6c6162656c3d4349)](https://github.com/pieceofcake2/seo/actions/workflows/CI.yml)[![Codecov](https://camo.githubusercontent.com/a55a6487540fcc8258f297c667b166abec3da487b6ea4b42a7ab3d4a19cfdde4/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f67682f70696563656f6663616b65322f73656f3f6c6162656c3d436f766572616765)](https://codecov.io/gh/pieceofcake2/seo)

**This is forked for CakePHP2.**

Features
--------

[](#features)

Complete tool for all your CakePHP Search Engine Optimization needs

- Easy yet powerful 301 redirect tools only loaded when a 404 would otherwise occur
- Highly configurable and intelligent 404 deep url guessing utilizing levenshtein's distance and your sitemap.xml
- Highly configurable and customizable Meta Tags for any incoming URI
- Title tag overwrites based on URI
- Custom Status Codes based on URI
- Scrapper Banning administration, complete with honeyPot baiting for scrappers to ban themselves.
- Google Analytics AB Testing Management based on URIs

Changelog
---------

[](#changelog)

See [CHANGELOG.md](CHANGELOG.md) for version history.

Install
-------

[](#install)

Clone the repository into your `app/Plugin/Seo` directory:

```
composer require pieceofcake2/seo
```

Run the schema into your database:

```
cake schema create --plugin Seo
```

Setup
-----

[](#setup)

Create the file `app/Config/seo.php` with the following configurations like so:

```
$config = [
    'Seo' => [
        'approverEmail' => 'nick@example.com',
        'replyEmail' => 'noreply@example.com',
        'emailConfig' => 'default', //config of your email, if false will use default CakeEmail()
        'parentDomain' => 'http://www.example.com',
        'aggressive' => true, //if false, log affenders for later review instead of autobanning
        'triggerCount' => 2,
        'timeBetweenTriggers' => 60 * 60 * 24, //seconds
        'honeyPot' => ['admin' => false, 'plugin' => 'seo', 'controller' => 'seo_blacklists', 'action' => 'honeypot'],
        'log' => true,
        'cacheEngine' => false, // optionally cache things to save on DB requests - eg: 'default'
        'searchTerms' => true, //turn on term finding
        'levenshtein' => [
            'active' => false,
            'threshold' => 5, //-1 to ALWAYS find the closest match
            'cost_add' => 1, //cost to add a character, higher the amount the less you can add to find a match
            'cost_change' => 1, //cost to change a character, higher the amount the less you can change to find a match
            'cost_delete' => 1, //cost to delete a character, higher the ammount the less you can delete to find a match
            'source' => '/sitemap.xml', //URL to list of urls in a sitemap
        ],
        'abTesting' => [
            'category' => 'ABTest', //Category for your ABTesting in Google Analytics
            'scope' => 3, //Scope for your ABTesting in Google Analytics
            'slot' => 4, //Slot for your ABTesting in Google Analytics
            'legacy' => false, //Uses Legacy verion of Google Analytics JS code pageTracker._setCustomVar(...)
            'session' => true, //will use sessions to store tests for users who've already seen them.
            'redmine' => false, //or the full URL if your redmine http://www.redmine-example.com/issues/
        ],
    ],
];
```

SEO Redirect/Status Code Quick Start
------------------------------------

[](#seo-redirectstatus-code-quick-start)

update file `app/Config/core.php` with the following:

```
Configure::write('Exception', [
    'handler' => 'SeoExceptionHandler::handle',
    'renderer' => 'ExceptionRenderer',
    'log' => true,
]);
```

update file `app/Config/bootstrap.php` with the following:

```
require_once APP . 'Plugin' . DS . 'Seo' . DS . 'Lib' . DS . 'Error' . DS . 'SeoAppError.php';
```

### Add Redirects

[](#add-redirects)

`http://www.example.com/admin/seo/seo_redirects/`

### Add Status Codes

[](#add-status-codes)

`http://www.example.com/admin/seo/seo_status_codes/`

NOTE: Special case Status Code 200 will return minimum bandwidth noindex robots page, for alternative url killing (410 alternative)

SEO Meta Tags Quick Start
-------------------------

[](#seo-meta-tags-quick-start)

Include the `Seo.Seo` Helper to your `AppController.php`:

```
public $helpers = ['Seo.Seo'];
```

Alter your layout to include the Seo Meta Tags in the head of your layout

```

```

### Add Meta Tags

[](#add-meta-tags)

`http://www.example.com/admin/seo/seo_meta_tags`

SEO Titles Quick Start
----------------------

[](#seo-titles-quick-start)

Include the `Seo.Seo` Helper to your `AppController.php`:

```
public $helpers = ['Seo.Seo'];
```

Alter your layout to include the Seo Title in the head of your layout

```

```

### Add Title Tags

[](#add-title-tags)

`http://www.example.com/admin/seo/seo_titles`

SEO Canonical Quick Start
-------------------------

[](#seo-canonical-quick-start)

Include the `Seo.Seo` Helper to your `AppController.php`:

```
public $helpers = ['Seo.Seo'];
```

Alter your layout to include the Seo Canonical in the head of your layout

```

```

### Add Canonical Links

[](#add-canonical-links)

`http://www.example.com/admin/seo/seo_canonicals`

SEO BlackList Quick Start
-------------------------

[](#seo-blacklist-quick-start)

Include The `Seo.BlackList` Component in your `AppController.php`:

```
public $components = ['Seo.BlackList'];
```

Start adding honeypot links in and around your application to bait malicious content grabbers

```

```

Update your `robots.txt` to exclude `/seo/` from being spidered. All legitimate spiders will ignore the honeyPot

```
User-agent: *
Disallow: /seo/
```

### Add/Manage Banned IPs

[](#addmanage-banned-ips)

`http://www.example.com/admin/seo/seo_blacklists`

SEO AB Testing Quick Start
--------------------------

[](#seo-ab-testing-quick-start)

Include the `Seo.Seo` Helper and the `Seo.ABTest` Component to your `AppController.php`:

```
public $helpers = ['Seo.Seo'];
public $components = ['Seo.ABTest'];
```

In your GA code on your site add the line like so:

```

    var pageTracker = _gat._getTracker('UA-SOMEKEY');

```

In your `AppController.php`, to test if you're on a testable page and serve it do something like this:

```
public function beforeFilter(){
    if($test = $this->ABTest->getTest()){
        //Do things specific to this test
        $this->set('ABTest', $test);
        $this->view = $test['SeoABTest']['slug'];
    }
    return parent::beforeFilter();
}
```

ProTip: For debuging in your controller before going live in GA set the debug flag to true, this will return tests that aren't active yet.

```
$test = $this->SeoABTest->getTest(['debug' => true]);
```

### Add AB Tests

[](#add-ab-tests)

`http://www.example.com/admin/seo/seo_a_b_tests`

ProTip: By setting the ABTest to debug, it will return true in your controller, but you won't be tracking the GA code.

Wiki Links
==========

[](#wiki-links)

-
-
-

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance58

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.4% of commits — single point of failure

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 ~0 days

Total

2

Last Release

270d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/578548?v=4)[TSURU](/maintainers/ttsuru)[@ttsuru](https://github.com/ttsuru)

---

Top Contributors

[![webtechnick](https://avatars.githubusercontent.com/u/26438?v=4)](https://github.com/webtechnick "webtechnick (146 commits)")[![zeroasterisk](https://avatars.githubusercontent.com/u/23422?v=4)](https://github.com/zeroasterisk "zeroasterisk (16 commits)")[![ttsuru](https://avatars.githubusercontent.com/u/578548?v=4)](https://github.com/ttsuru "ttsuru (5 commits)")[![styks1111](https://avatars.githubusercontent.com/u/642930?v=4)](https://github.com/styks1111 "styks1111 (2 commits)")[![beckye67](https://avatars.githubusercontent.com/u/3694753?v=4)](https://github.com/beckye67 "beckye67 (2 commits)")[![sdd](https://avatars.githubusercontent.com/u/323439?v=4)](https://github.com/sdd "sdd (1 commits)")[![ddehaanhh](https://avatars.githubusercontent.com/u/22452134?v=4)](https://github.com/ddehaanhh "ddehaanhh (1 commits)")

---

Tags

cakephpseocakephp2

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/pieceofcake2-seo/health.svg)

```
[![Health](https://phpackages.com/badges/pieceofcake2-seo/health.svg)](https://phpackages.com/packages/pieceofcake2-seo)
```

###  Alternatives

[helsingborg-stad/municipio

A bootstrap theme for creating municipality sites.

4028.5k10](/packages/helsingborg-stad-municipio)[mediawiki/maps

Adds various mapping features to MediaWiki

84152.3k3](/packages/mediawiki-maps)[civicrm/civicrm-drupal-8

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

19251.4k3](/packages/civicrm-civicrm-drupal-8)[altis/core

Core module for Altis

19228.0k3](/packages/altis-core)[wanze/seo-maestro

Seo Maestro allows to easily manage your page's meta data and sitemap.

373.4k](/packages/wanze-seo-maestro)[pressbooks/pressbooks-aldine

Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher.

114.5k](/packages/pressbooks-pressbooks-aldine)

PHPackages © 2026

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