=== P2PForge ===
Contributors: p2pclouds
Tags: seo, programmatic seo, csv, bulk pages, page generator
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Donate link: https://p2pclouds.net

Programmatic SEO page automation for WordPress — upload CSV data, build templates with placeholders, and generate hundreds of unique pages in bulk.

== Description ==

P2PForge helps you create large sets of unique, SEO-friendly WordPress pages from a CSV file and reusable templates. Each row in your spreadsheet becomes a page with its own title, slug, content, excerpt, and SEO meta fields.

This plugin runs entirely on your WordPress site. It does not connect to external servers or third-party APIs. Your CSV files and generated content stay on your server.

**Key features**

* **CSV upload** — import data with automatic delimiter detection (comma, semicolon, tab, pipe)
* **Dynamic placeholders** — any CSV column becomes `{ColumnName}` in title, slug, content, excerpt, and SEO meta
* **Reusable templates** — define one template and generate hundreds or thousands of pages
* **Bulk generation** — create up to 500 pages per run (filterable via the `P2PFORGE_BATCH_LIMIT` constant)
* **Duplicate protection** — skips rows when the target slug already exists
* **SEO plugin support** — writes meta to Yoast SEO and Rank Math when those plugins are active
* **Post types** — generate standard Pages or Posts
* **Parent page support** — nest generated pages under an existing parent page
* **Draft review workflow** — review generated pages before publishing in bulk

**Built by [P2P Clouds](https://p2pclouds.net)**

P2P Clouds is a software house and emerging technology marketing company. We build tools that help businesses grow with technology.

== Installation ==

1. Upload the `p2pforge` folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress Plugins screen.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Open **P2PForge** in the WordPress admin sidebar to get started.

**Important:** When uploading a zip file, the main plugin file must be at `p2pforge/p2pforge.php` inside the archive. Do not nest an extra parent folder around the plugin directory.

== Frequently Asked Questions ==

= Does this plugin call external services? =

No. P2PForge processes CSV files and creates WordPress pages locally on your site. No data is sent to third-party servers.

= What CSV format is supported? =

The first row must contain column headers. Example:

`City,State,Service`

Each following row is one page to generate. Delimiters are detected automatically.

= How do placeholders work? =

Use `{ColumnName}` in your template fields to match CSV headers. Matching is case-insensitive, so `{city}` and `{City}` are treated the same. Placeholders that do not match a column are left unchanged in the output.

= Can I generate more than 500 pages at once? =

Generation runs in batches of up to 500 pages per request (default). For larger CSV files, use the **Start Row** and **Rows Per Run** options on the Generate screen to process the file in multiple batches.

= Which SEO plugins are supported? =

P2PForge can write SEO title and meta description fields for Yoast SEO and Rank Math when those plugins are installed and active.

= What are the minimum requirements? =

WordPress 5.8 or later and PHP 7.4 or later.

== Screenshots ==

1. P2PForge dashboard with quick-start overview
2. Data Sources screen for CSV upload
3. Template editor with placeholder tags
4. Generate Pages screen for bulk creation
5. Generated Pages list for review and publishing

== Changelog ==

= 1.0.5 =
* Sanitize and validate all template settings on save, including title pattern
* Harden CSV upload and delete handlers with proper input sanitization

= 1.0.4 =
* Initial public release for WordPress.org review

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.0.5 =
Security and data sanitization improvements for template settings.

= 1.0.4 =
Initial public release.
