# jetrails/magento2-cloudflare

> Interact with popular Cloudflare features though Magento's backend portal

`composer require jetrails/magento2-cloudflare`

Canonical URL: https://packagento.com/jetrails/magento2-cloudflare

## At a glance

- **Vendor**: jetrails (https://packagento.com/jetrails.md)
- **Latest version**: 1.4.2 — released 2024-06-20
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/jetrails/magento2-cloudflare and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require jetrails/magento2-cloudflare:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Interact with popular Cloudflare features though Magento's backend portal

## README

> Interact with popular Cloudflare features though Magento's backend portal.

![](https://img.shields.io/badge/License-MIT-orange.svg?style=for-the-badge)
![](https://img.shields.io/badge/Version-1.4.2-orange.svg?style=for-the-badge)
![](https://img.shields.io/badge/Stability-Stable-orange.svg?style=for-the-badge)
![](https://img.shields.io/badge/Magento-2-orange.svg?style=for-the-badge)

<p align="center" >
	<img src="docs/images/preview.png" width="100%" />
</p>

### Documentation

The user guide can be found [here](https://learn.jetrails.com/article/magento-2-cloudflare-extension).  The user guide goes through the installation process as well as explains all the features that comes with this extension. For further support, please email [development@jetrails.com](mailto://development@jetrails.com).

### Build System

A simple [Makefile](Makefile) is used as a build system. Run `make help` to see available commands.

### Development Environment

We use a super simple development environment that is ephemeral. You can spin it up by doing the following:

```shell
docker compose up -d
docker compose logs -f
docker compose down # destroy environment
```

You can deploy the module into the development environment by running the following:

```shell
make clean
make build
make deploy
```

You can then access the magento container by running the following:

```shell
docker compose exec magento bash
```

Once in the container you can run the standard commands to install the module:

```shell
magento setup:upgrade
magento setup:di:compile
```

The Magento site is hosted on http://localhost and the backend can be reached at http://localhost/admin. Default user name is `jetrails` and default password is `magento2`.

## Recent Versions

| Version | Released |
|---|---|
| 1.4.2 | 2024-06-20 |
| 1.4.1 | 2023-04-12 |
| 1.4.0 | 2022-06-23 |
| 1.3.9 | 2022-06-14 |
| 1.3.8 | 2022-04-06 |
| 1.3.7 | 2021-11-03 |
| 1.3.6 | 2021-07-23 |
| 1.3.5 | 2021-07-15 |
| 1.3.4 | 2021-06-07 |
| 1.3.3 | 2021-04-27 |

Showing 10 of 24 versions. Full release history on https://packagento.com/jetrails/magento2-cloudflare.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| php | >=7.2 |

### Require (dev)

| Package | Constraint |
|---|---|
| phpcompatibility/php-compatibility | * |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["jetrails/magento2-cloudflare"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

jetrails is a Magento 2 vendor on Packagento. See https://packagento.com/jetrails.md for their full catalogue.

