WP Siteroots
A simple plugin for wordpress to be able to generate sitemap in Schema form
by John Paul Perez · github.com/jopenski99/wp-siteroots · website
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jopenski99/wp-siteroots/archive/refs/heads/main.zipPlugin Overview — WP Siteroots
Plugin Name: WP Siteroots Version: 1.8.0 Author: John Paul Perez Description: WP Siteroots is a WordPress plugin that creates JSON endpoints for site schema and structured data. It provides a Shopify-compatible schema bridge for products, posts, pages, and custom post types — making it useful for WordPress-to-Shopify integrations or headless data sync setups.
Features
- Generates JSON-formatted sitemaps for:
- Products (WooCommerce support included)
- Posts
- Pages
- Custom post types
- Provides two custom endpoints:
/sitemap-schema.json— view live JSON schema/sitemap-schema-download.json— downloadable JSON data
- Includes site metadata: name, URL, generation date
- Compatible with both standard WordPress and WooCommerce
Installation
Option 1: Upload via WordPress Admin
- Download the ZIP file provided with this plugin (
wp-siteroots.zipor similar). - In your WordPress dashboard, go to: Plugins → Add New → Upload Plugin
- Upload the ZIP file and click Install Now.
- After installation, click Activate Plugin.
Option 2: Manual Installation (FTP / File Manager)
- Unzip the provided file on your computer.
- Upload the folder (e.g.,
wp-siteroots) to your site’s/wp-content/plugins/directory. - Go to Plugins → Installed Plugins and click Activate.
Usage
Once activated:
-
Visit your site and append
/sitemap-schema.jsonto the base URL, for example:https://yourwebsite.com/sitemap-schema.jsonThis will show the full structured JSON schema of your site.
-
To download the JSON schema file, use:
https://yourwebsite.com/sitemap-schema-download.json
You can integrate this endpoint into a Shopify store, app, or external service that needs WordPress content in JSON format.
Technical Notes
- Hooks:
init— Registers custom rewrite rules and query vars.
- Uses WordPress functions:
get_post_types,WP_Query,get_the_title,get_permalink, etc.
- WooCommerce support:
- Checks for
wc_get_product()function before accessing product data.
- Checks for
- Output:
- Returns schema in JSON format via
wp_send_json()or downloadable JSON headers.
- Returns schema in JSON format via
Requirements
- WordPress 5.0 or later
- PHP 7.4 or later
- Optional: WooCommerce (for product schema support)
License
This plugin is licensed under the GPLv2 or later license.
A simple plugin for wordpress to be able to generate sitemap in Schema form
| Feature | Description |
|---|---|
| Admin UI | You can now select which post types to include in the sitemap. |
| Caching | Uses WordPress transients to reduce DB load. |
| Schema Detail | Adds author, publication dates, description, and featured image. |
| Safe JSON Output | Useswp_send_json()instead of manually setting headers. |
| Rewrite Management | Automatically flushes rewrite rules on plugin (de)activation. |
| Structured Metadata | IncludesdateGenerated,baseUrl, and language code. |